diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index bb702b3ed92..c27da11ad6f 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('%s' % (all, escape(all)))
+ url = escape(all).replace('"', '"')
+ results.append('%s' % (url, url))
elif rfc:
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
results.append('%s' % (url, escape(all)))