]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport nascheme's checkin of
authorMichael W. Hudson <mwh@python.net>
Mon, 25 Mar 2002 13:11:47 +0000 (13:11 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 25 Mar 2002 13:11:47 +0000 (13:11 +0000)
    revision 1.60 of pydoc.py

Quote href properly.

Lib/pydoc.py

index 46ef319d96c39d711459af2cce2c1157a5346dab..abf84e6cd4d15bf95a2362ae53553f14d956681b 100755 (executable)
@@ -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)))