Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 1374:8e4c3e8de96f
fix StringHTMLProperty hyperlinking
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 13 Jan 2003 23:30:44 +0000 |
| parents | 52ef206a483b |
| children | d5314bfab0c0 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Mon Jan 13 22:26:57 2003 +0000 +++ b/roundup/cgi/templating.py Mon Jan 13 23:30:44 2003 +0000 @@ -786,7 +786,7 @@ except KeyError: return '%s%s'%(s1, s2) - def plain(self, escape=0, hyperlink=1): + def plain(self, escape=0, hyperlink=0): ''' Render a "plain" representation of the property "escape" turns on/off HTML quoting @@ -798,8 +798,10 @@ if escape: s = cgi.escape(str(self._value)) else: - s = self._value + s = str(self._value) if hyperlink: + if not escape: + s = cgi.escape(s) s = self.url_re.sub(self._url_repl, s) s = self.email_re.sub(self._email_repl, s) s = self.designator_re.sub(self._designator_repl, s)
