allura
修訂 | 23eb6c01e2f78b4a46c9ee522afa725f37d0c6ef (tree) |
---|---|
時間 | 2012-06-13 03:59:08 |
作者 | Igor Bondarenko <jetmind2@gmai...> |
Commiter | Cory Johns |
[#3792] ticket:72 fix mailto: links
@@ -170,7 +170,8 @@ class ForgeProcessor(object): | ||
170 | 170 | |
171 | 171 | def _expand_link(self, link): |
172 | 172 | reference = self.alinks.get(link) |
173 | - if not reference: | |
173 | + mailto = u'\x02amp\x03#109;\x02amp\x03#97;\x02amp\x03#105;\x02amp\x03#108;\x02amp\x03#116;\x02amp\x03#111;\x02amp\x03#58;' | |
174 | + if not reference and not link.startswith(mailto): | |
174 | 175 | return 'notfound' |
175 | 176 | else: |
176 | 177 | return '' |
@@ -261,6 +262,7 @@ class RelativeLinkRewriter(markdown.postprocessors.Postprocessor): | ||
261 | 262 | return |
262 | 263 | if val.startswith('/'): return |
263 | 264 | if val.startswith('.'): return |
265 | + if val.startswith('mailto:'): return | |
264 | 266 | tag[attr] = '../' + val |
265 | 267 | |
266 | 268 | def _rewrite_abs(self, tag, attr): |