Changeset 1247:090a087cb3a0

Timestamp:
06/28/09 18:50:51 (11 months ago)
Author:
tony
Children:
1248:423fa328fb01, 1283:a68f23d08990
Branch:
default
Tags:
0.7.1
Message:

#74 fix - correct html specialchars quoting in comment email notify

Location:
apps
Files:
1 added
2 modified

  • discussion/models.py (modified) (1 diff)
  • lib/html.py (added)
  • watchlist/mail.py (modified) (1 diff)

Legend:

Unmodified
Added
Removed
  • apps/discussion/models.py

    r1232 r1247  
    110 110     get_clean_html.allow_tags = True 
    111 111  
      112     @property 
      113     def mail_body(self): 
      114         """ 
      115         Only for case when user types char code in comment. F.e. user 
      116         types € - it'll be rendered in HTML correctly, but we also 
      117         need it in mail messages. 
      118         """ 
      119         from lib.html import descape 
      120         return descape(self.body) 
      121  
    112 122     def save(self): 
    113 123         if self.body: 
  • apps/watchlist/mail.py

    r1143 r1247  
    19 19  
    20 20 Comment text: 
    21   {{ comment.body }} 
      21 {{ comment.mail_body|safe }} 
    22 22  
    23 23 Reply: {{ site_url }}{{ comment.get_absolute_url }}