[Python-checkins] r66926 - in doctools/trunk: CHANGES sphinx/htmlhelp.py

georg.brandl python-checkins at python.org
Thu Oct 16 21:48:36 CEST 2008


Author: georg.brandl
Date: Thu Oct 16 21:48:35 2008
New Revision: 66926

Log:
Escape " to " in HTML help attribute values. #25.


Modified:
   doctools/trunk/CHANGES
   doctools/trunk/sphinx/htmlhelp.py

Modified: doctools/trunk/CHANGES
==============================================================================
--- doctools/trunk/CHANGES	(original)
+++ doctools/trunk/CHANGES	Thu Oct 16 21:48:35 2008
@@ -111,6 +111,11 @@
 
   - Added ``cmember`` role for consistency.
 
+Bugs fixed
+----------
+
+* Properly escape quotes in HTML help attribute values.
+
 
 Release 0.4.3 (Oct 8, 2008)
 ===========================

Modified: doctools/trunk/sphinx/htmlhelp.py
==============================================================================
--- doctools/trunk/sphinx/htmlhelp.py	(original)
+++ doctools/trunk/sphinx/htmlhelp.py	Thu Oct 16 21:48:35 2008
@@ -164,7 +164,8 @@
                     write_toc(subnode, ullevel)
             elif isinstance(node, nodes.reference):
                 link = node['refuri']
-                item = object_sitemap % (cgi.escape(node.astext()), link)
+                title = cgi.escape(node.astext()).replace('"','"')
+                item = object_sitemap % (title, link)
                 f.write(item.encode('ascii', 'xmlcharrefreplace'))
             elif isinstance(node, nodes.bullet_list):
                 if ullevel != 0:


More information about the Python-checkins mailing list