Changes between Initial Version and Version 1 of Ticket #11268, comment 1
- Timestamp:
- Aug 7, 2013, 3:36:52 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11268, comment 1
initial v1 1 1 This is really just a special case of #1502. 2 2 3 I did some hunting around. The [browser:/tags/trac-1.0.1/trac/ticket/web_ui.py@:231#L196 formatting] 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.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 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.