This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fixes pydoc http/ftp URL matching
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nascheme Nosy List: bquinlan, nascheme
Priority: normal Keywords: patch

Created on 2002-02-25 18:50 by bquinlan, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pydoc1.diff bquinlan, 2002-02-25 18:50 pydoc.py patch
pydoc-test.py bquinlan, 2002-02-25 18:50 Test file
Messages (2)
msg39076 - (view) Author: Brian Quinlan (bquinlan) * (Python committer) Date: 2002-02-25 18:50
The current URL matching pattern used by pydoc only 
excludes whitespace. My patch also excludes the 
following characters:

' & " - excludes the quotes in: <a href="...">
< & > - As stated in RFC-1738:

"""The characters "<" and ">" are unsafe because they 
are used as the delimiters around URLs in free text"""

We don't want to include the delimeters as part of the 
URL. And including unescaped "<" in an attribute value 
is not legal markup.

Also, remove the word boundary requirement for 
http/ftp URIs because otherwise the "/" would not be 
included in the following URL: "http://www.python.org/"

Attached is the patch and some simple test code.

msg39077 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2002-03-24 23:13
Logged In: YES 
user_id=35752

Fixed in pydoc 1.60.  I dropped the trailing \b.  Instead
of restricting the characters in the URL I changed the
code to properly quote it.
History
Date User Action Args
2022-04-10 16:05:02adminsetgithub: 36156
2002-02-25 18:50:05bquinlancreate