• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修訂23eb6c01e2f78b4a46c9ee522afa725f37d0c6ef (tree)
時間2012-06-13 03:59:08
作者Igor Bondarenko <jetmind2@gmai...>
CommiterCory Johns

Log Message

[#3792] ticket:72 fix mailto: links

Change Summary

差異

--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -170,7 +170,8 @@ class ForgeProcessor(object):
170170
171171 def _expand_link(self, link):
172172 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):
174175 return 'notfound'
175176 else:
176177 return ''
@@ -261,6 +262,7 @@ class RelativeLinkRewriter(markdown.postprocessors.Postprocessor):
261262 return
262263 if val.startswith('/'): return
263264 if val.startswith('.'): return
265+ if val.startswith('mailto:'): return
264266 tag[attr] = '../' + val
265267
266268 def _rewrite_abs(self, tag, attr):