3142: linkifyText(): trailing punctuation is included in the URL
- Fixed
- Review Board
javaw*****@opengro******* (Google Code) (Is this you? Claim this profile.) | |
Jan. 18, 2014 |
What version are you running? 1.7.9 What's the URL of the page containing the problem? Any review page, e.g. reviewboard/r/* What steps will reproduce the problem? 1. Set a review's description to contain a link ending with "." or ",", for example "http://some/url." or "http://some/url,". What is the expected output? What do you see instead? Only "http://some/url" should be linked; the trailing "." should not be part of the link. Instead, the trailing "." is included in the link, and the link points to "http://some/url.". What operating system are you using? What browser? Chrome and Firefox on Ubuntu 12.04.
Unfortunately, '.' is a perfectly valid character to appear in URLs. It's really hard to sort out a users' intentions when all we have to go on is the text. Perhaps we can make a judgment call based on whether there's a following space.
Most things I've used, gmail included, ignores a period at the end of a URL, if there's a space or newline. I think that's a good route to go.
That sounds reasonable enough. IIRC Docutils does the same thing.