Issue 2550659
Created on 2010-07-23 16:35 by ezio.melotti, last changed 2010-07-24 09:45 by richard.
File name |
Uploaded |
Description |
Edit |
Remove |
register_propclass.diff
|
ezio.melotti,
2010-07-23 16:35
|
Patch that adds a register_propclass function and refactors StringHTMLProperty to make it more extensible |
|
|
msg4100 |
Author: [hidden] (ezio.melotti) |
Date: 2010-07-23 16:35 |
|
In templating.py the StringHTMLProperty has an hyperlinked() method that
linkifies URLs, emails and items, but there's no way to linkify only
URLs or only emails or any other intermediate combination.
The attached patch:
1) breaks the content of _hyper_repl and changes it to call 3 different
methods (for URLs, emails, and items).
2) adds a register_propclass function that allow to register other classes.
In this way is possible to subclass StringHTMLProperty, override any of
the 3 methods, and use the new subclass instead of StringHTMLProperty.
|
msg4101 |
Author: [hidden] (richard) |
Date: 2010-07-24 09:45 |
|
Accepted, thanks!
|
|
Date |
User |
Action |
Args |
2010-07-24 09:45:10 | richard | set | status: new -> closed resolution: accepted messages:
+ msg4101 nosy:
+ richard |
2010-07-23 16:35:09 | ezio.melotti | create | |
|