bug-texinfo
[Top][All Lists]
Advanced

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

Re: html output: escaping of & in title


From: Karl Berry
Subject: Re: html output: escaping of & in title
Date: Fri, 24 Mar 2006 18:15:40 -0600

Hi Ralf,

    and it generates:
    | title="Program & Function Index"

In a <link>?  I found an unescaped & there and made the patch below, but
don't know if that's what you were seeing too.

For the record, I ran makeinfo on the test file below like this:
makeinfo -o titleamp.out --html  titleamp.tex

Thanks,
Karl

\input texinfo
@setfilename titleamp.info
@settitle title & bar

@node Top
@top Title & Bar

@menu
* Program & Function::
@end menu

@node Program & Function
@chapter Program & Function

@bye


--- html.c.~1.31.~      2005-05-14 17:00:07.000000000 -0700
+++ html.c      2006-03-24 16:11:16.000000000 -0800
@@ -399,5 +399,5 @@
     }
   while (string[i++]);
-  free (string);
+
   return newstring - newlen;
 }
@@ -588,9 +588,13 @@
   if (nodename)
     {
+      char *escaped_nodename;
       add_html_elt ("<link ");
       add_word_args ("%s", attributes);
       add_word_args (" href=\"");
       add_anchor_name (nodename, 1);
-      add_word_args ("\" title=\"%s\">\n", nodename);
+      escaped_nodename = escape_string (nodename);
+      add_word_args ("\" title=\"%s\">\n", escaped_nodename);
+      if (escaped_nodename != nodename)
+        free (escaped_nodename);
     }
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]