Changeset 3716

Show
Ignore:
Timestamp:
05/25/08 01:59:04 (6 months ago)
Author:
pacopablo
Message:

Added call to trac.html.escape for text of email in 0.10 version.
Closes #2795

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • emailprocessormacro/0.10/emailprocessor.py

    r3043 r3716  
    1010 
    1111from trac.wiki.macros import WikiMacroBase 
    12 from trac.wiki.api import IWikiMacroProvider 
    1312from trac.util.text import wrap 
    14 from trac.util.html import Markup 
     13from trac.util.html import Markup, escape 
     14 
     15__all__ = ["EmailMacro"] 
    1516 
    1617class EmailMacro(WikiMacroBase): 
     
    3435 
    3536    def render_macro(self, req, name, content):  
    36         text = wrap(content, cols=72) 
    37         return Markup("<pre class='wiki'>%s</pre>" % text
     37        text = content and wrap(content, cols=72) or '' 
     38        return Markup("<pre class='wiki'>%s</pre>" % escape(text)
    3839