Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 1371:56c5b4509378 maint-0.5
revert StringHTMLProperty to not hyperlink text by default (added doc too)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 13 Jan 2003 04:24:54 +0000 |
| parents | 83f33642d220 |
| children | 3c9bd1faddd8 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Mon Jan 13 02:45:09 2003 +0000 +++ b/roundup/cgi/templating.py Mon Jan 13 04:24:54 2003 +0000 @@ -754,7 +754,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 @@ -766,8 +766,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)
