Roundup Tracker - Issues

Message4111

Author ezio.melotti
Recipients ezio.melotti, richard
Date 2010-08-11.19:28:14
Message-id <1281554896.71.0.947806353616.issue2550664@psf.upfronthosting.co.za>
In-reply-to
The current code in templating.py:StringHTMLProperty._hyper_repl_url
checks for a &gt; *at the end* of the URL. If the url is e.g.
"<www.roundup.net>.":
 1) the string is first converted to "&lt;www.roundup.net&gt;.";
 2) the regex matches the whole string, including the trailing '.';
 3) _hyper_repl_url checks for a &gt; at the end of the string and
doesn't find it (because there's the dot);
 4) the whole string is converted to a link.

The attached patch checks for a &gt; in any point of the URL and convert
to a link only the part before it. It also refactors a bit the function
in order to apply the parentheses checks even when the &gt; is found and
improve it in case the ending ')' is missing.
History
Date User Action Args
2010-08-11 19:28:17ezio.melottisetrecipients: + ezio.melotti, richard
2010-08-11 19:28:16ezio.melottisetmessageid: <1281554896.71.0.947806353616.issue2550664@psf.upfronthosting.co.za>
2010-08-11 19:28:16ezio.melottilinkissue2550664 messages
2010-08-11 19:28:15ezio.melotticreate