Changes between Version 1 and Version 2 of Ticket #11268, comment 1
- Timestamp:
- Feb 16, 2014, 7:38:42 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11268, comment 1
v1 v2 3 3 I did some hunting around. The [browser:/tags/trac-1.0.1/trac/ticket/web_ui.py@:231#L196 preparation] of the search results is done by [browser:/tags/trac-1.0.1/trac/search/api.py@:66-92#L66 trac.search.api.shorten_result], and we can see that it doesn't take any care to obfuscate the email addresses, or do any other wiki formatting. 4 4 5 On the other hand the timeline renderer [browser:/tags/trac-1.0.1/trac/ticket/web_ui.py?marks=414#L377 calls a formatter], passing a `RenderingContext`. We could probably utilize the `OneLineFormatter` after calling `shorten_result`. It looks like `short _result` just attempts to extract a segment of text around the first matching term.5 On the other hand the timeline renderer [browser:/tags/trac-1.0.1/trac/ticket/web_ui.py?marks=414#L377 calls a formatter], passing a `RenderingContext`. We could probably utilize the `OneLineFormatter` after calling `shorten_result`. It looks like `shorten_result` just attempts to extract a segment of text around the first matching term.