Issue 2550664
Created on 2010-08-11 19:28 by ezio.melotti, last changed 2010-08-12 07:26 by ezio.melotti.
File name |
Uploaded |
Description |
Edit |
Remove |
gt.diff
|
ezio.melotti,
2010-08-11 19:28
|
Patch to improve the handling of '>'. |
|
|
msg4111 |
Author: [hidden] (ezio.melotti) |
Date: 2010-08-11 19:28 |
|
The current code in templating.py:StringHTMLProperty._hyper_repl_url
checks for a > *at the end* of the URL. If the url is e.g.
"<www.roundup.net>.":
1) the string is first converted to "<www.roundup.net>.";
2) the regex matches the whole string, including the trailing '.';
3) _hyper_repl_url checks for a > 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 > 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 > is found and
improve it in case the ending ')' is missing.
|
msg4112 |
Author: [hidden] (ezio.melotti) |
Date: 2010-08-11 19:38 |
|
The example is wrong, the problem is only in the 'path' part of the url,
i.e. "<http://roundup.net/>.".
The patch is still valid.
|
msg4113 |
Author: [hidden] (richard) |
Date: 2010-08-12 04:59 |
|
Looks good to me, thanks!
|
msg4116 |
Author: [hidden] (ezio.melotti) |
Date: 2010-08-12 07:26 |
|
Thanks!
|
|
Date |
User |
Action |
Args |
2010-08-12 07:26:36 | ezio.melotti | set | messages:
+ msg4116 |
2010-08-12 04:59:58 | richard | set | status: new -> closed assignee: richard messages:
+ msg4113 priority: normal |
2010-08-11 19:38:04 | ezio.melotti | set | messages:
+ msg4112 |
2010-08-11 19:28:16 | ezio.melotti | create | |
|