[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#218310: bibtex2html: doesn't properly quote '&'



Package: bibtex2html
Version: 1.65-1
Severity: normal
Tags: patch

Hello,

I have a BibTeX entry with an url field like this:

  url = {http://www.springerlink.com/openurl.asp?genre=article&issn=0302-9743&volume=2840&spage=657},

which bibtex2html translates into HTML by:

  URL = {<a href="http://www.springerlink.com/openurl.asp?genre=article&amp;issn=0302-9743&amp;volume=2536&amp;spage=82";>http://www.springerlink.com/openurl.asp?genre=article&issn=0302-9743&volume=2536&spage=82</a>},

The &'s are correctly quoted inside the href="..." but not between <a>
and </a>. It should produce something like:

  URL = {<a href="http://www.springerlink.com/openurl.asp?genre=article&amp;issn=0302-9743&amp;volume=2536&amp;spage=82";>http://www.springerlink.com/openurl.asp?genre=article&amp;issn=0302-9743&amp;volume=2536&amp;spage=82</a>},

Here is a simple patch correcting my problem. Note that I didn't check
if a similar fix were needed elsewhere.

--- ../bibtex2html-1.65/biboutput.ml    Thu Oct 30 14:23:00 2003
+++ bibtex2html-1.65/biboutput.ml       Thu Oct 30 14:12:04 2003
@@ -75,7 +75,7 @@
   | [String s] ->
       output_string ch "{";
       Html.open_href ch s;
-      output_string ch s;
+      output_string ch (Html.quote_amp s);
       Html.close_href ch;
       output_string ch "}"
   | l ->

-- 
Arnaud Giersch



Reply to: