Edgewall Software

Changes between Initial Version and Version 1 of Ticket #11268, comment 1


Ignore:
Timestamp:
Aug 7, 2013, 3:36:52 AM (11 years ago)
Author:
Ryan J Ollos

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11268, comment 1

    initial v1  
    11This is really just a special case of #1502.
    22
    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.
     3I 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.
    44
    55On 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.