summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-03-24 23:11:21 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-03-24 23:11:21 (GMT)
commitcddc1a0249fd3ace2711d5132605e773b78827b5 (patch)
tree337f70860b4bc95cb5c4a19a7e2ca99514a1d0ed
parent9d79990ac725830134b7a9147f18297a0e6da5db (diff)
downloadcpython-cddc1a0249fd3ace2711d5132605e773b78827b5.zip
cpython-cddc1a0249fd3ace2711d5132605e773b78827b5.tar.gz
cpython-cddc1a0249fd3ace2711d5132605e773b78827b5.tar.bz2
Quote href properly.
-rwxr-xr-xLib/pydoc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index bb702b3..c27da11 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -450,7 +450,8 @@ TT { font-family: lucidatypewriter, lucida console, courier }
all, scheme, rfc, pep, selfdot, name = match.groups()
if scheme:
- results.append('<a href="%s">%s</a>' % (all, escape(all)))
+ url = escape(all).replace('"', '&quot;')
+ results.append('<a href="%s">%s</a>' % (url, url))
elif rfc:
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
results.append('<a href="%s">%s</a>' % (url, escape(all)))