Browse Source

add missing latex2html in getArrayOfCommaSeparatedAuthors

pull/92/head
Martin Monperrus 7 years ago
parent
commit
4b6a36e570
  1. 3
      bibtexbrowser-test.php
  2. 5
      bibtexbrowser.php

3
bibtexbrowser-test.php

@ -405,6 +405,9 @@ class BTBTest extends PHPUnit_Framework_TestCase {
$this->assertEquals("à Book",$dis->getTitle());
$this->assertEquals("Jé Lo",$dis->getFormattedAuthorsString());
// ensure that it is comma separated, used for metadata
$this->assertEquals("Lo, Jé",$dis->getArrayOfCommaSeparatedAuthors()[0]);
bibtexbrowser_configure('BIBTEXBROWSER_USE_LATEX2HTML', false);
$test_data = fopen('php://memory','x+');
fwrite($test_data, $bibtex);

5
bibtexbrowser.php

@ -1582,10 +1582,13 @@ class BibEntry {
return $authors;
}
/** Returns the authors of this entry as an array in a comma-separated form */
/** Returns the authors of this entry as an array in a comma-separated form
* Mostly used to create meta tags (eg <meta>
*/
function getArrayOfCommaSeparatedAuthors() {
$authors = array();
foreach ($this->getRawAuthors() as $author) {
$author = $this->transformValue($author);
$authors[]=$this->formatAuthorCommaSeparated($author);
}
return $authors;

Loading…
Cancel
Save