diff --git a/bibtexbrowser.php b/bibtexbrowser.php index 7d315f7..0e69649 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -886,6 +886,9 @@ function latex2html($line) { $line = preg_replace('/([^\\\\])~/','\\1 ', $line); + $line = str_replace('---','—',$line); + $line = str_replace('--','–',$line); + // performance increases with this test // bug found by Serge Barral: what happens if we have curly braces only (typically to ensure case in Latex) // added && strpos($line,'{')===false @@ -895,6 +898,9 @@ function latex2html($line) { // in order not to mix with the HTML entities coming after (just in case) $line = str_replace('\\&','&', $line); + $line = str_replace('\_','_',$line); + $line = str_replace('\%','%',$line); + // handling \url{....} // often used in howpublished for @misc $line = preg_replace('/\\\\url\{(.*)\}/U','\\1', $line);