summaryrefslogtreecommitdiff
path: root/docutils
diff options
context:
space:
mode:
authorgoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-02-26 18:49:47 +0000
committergoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-02-26 18:49:47 +0000
commit0e18c2da596d332722d44a6d2fec3f38602806d7 (patch)
treeba7bea16686200e40d6f322f8fa3d632e117e4d2 /docutils
parent76d8df8a0fa5da0afc2b2c7084a2a682291d7079 (diff)
downloaddocutils-0e18c2da596d332722d44a6d2fec3f38602806d7.tar.gz
Fixed unencoded stylesheet reference bug (characters like "&" in stylesheet reference).
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2992 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
-rw-r--r--docutils/BUGS.txt6
-rw-r--r--docutils/HISTORY.txt5
-rw-r--r--docutils/docutils/writers/html4css1.py3
3 files changed, 7 insertions, 7 deletions
diff --git a/docutils/BUGS.txt b/docutils/BUGS.txt
index be318778e..b1e6dbb5c 100644
--- a/docutils/BUGS.txt
+++ b/docutils/BUGS.txt
@@ -119,12 +119,6 @@ Known Bugs
Also see the `SourceForge Bug Tracker`_.
-* .. _unencoded stylesheet reference:
-
- ``--stylesheet='foo&bar'`` causes an invalid stylesheet reference to
- be inserted in an HTML file, because the ``&`` isn't encoded as
- ``&amp;``.
-
* ``utils.relative_path()`` sometimes returns absolute _`paths on
Windows` (like ``C:/test/foo.css``) where it could have chosen a
relative path.
diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt
index f81312a36..0ab1fbb70 100644
--- a/docutils/HISTORY.txt
+++ b/docutils/HISTORY.txt
@@ -47,6 +47,11 @@ Changes Since 0.3.7
the next text element.
- Fixed duplicate footnote label bug.
+* docutils/writers/html4css1.py:
+
+ - Fixed unencoded stylesheet reference bug (characters like "&" in
+ stylesheet reference).
+
* docutils/writers/latex2e.py:
- Improved --use-latex-docinfo so that organization/contact/address
diff --git a/docutils/docutils/writers/html4css1.py b/docutils/docutils/writers/html4css1.py
index 6853a5d0b..148790b58 100644
--- a/docutils/docutils/writers/html4css1.py
+++ b/docutils/docutils/writers/html4css1.py
@@ -198,7 +198,8 @@ class HTMLTranslator(nodes.NodeVisitor):
else:
stylesheet = utils.get_stylesheet_reference(settings)
if stylesheet:
- self.stylesheet = [self.stylesheet_link % stylesheet]
+ self.stylesheet = [self.stylesheet_link
+ % self.encode(stylesheet)]
else:
self.stylesheet = []
self.body_prefix = ['</head>\n<body>\n']