aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-10-13 19:50:19 -0400
committerWaylan Limberg <waylan@gmail.com>2008-10-13 19:50:19 -0400
commit96dd69f7f9b99a8087f626b456cd1d3918ea8387 (patch)
tree5a249ba92f2cf89c12acb068dda4c3a74ebe3c0c /markdown.py
parent73325c8da3a4ab9181f3ea81416dececc6960ee0 (diff)
downloadmarkdown-96dd69f7f9b99a8087f626b456cd1d3918ea8387.tar.gz
markdown-96dd69f7f9b99a8087f626b456cd1d3918ea8387.tar.bz2
markdown-96dd69f7f9b99a8087f626b456cd1d3918ea8387.zip
Fixed the url sanitation after recent refactor. All tests pass now.
Diffstat (limited to 'markdown.py')
-rwxr-xr-xmarkdown.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/markdown.py b/markdown.py
index 77610f9..d9bd938 100755
--- a/markdown.py
+++ b/markdown.py
@@ -1347,7 +1347,7 @@ class LinkPattern (Pattern):
if ":" in part:
safe_url = False
- if self.safe_mode and not safe_url:
+ if self.markdown.safeMode and not safe_url:
return ''
else:
return urlunparse(url)
@@ -1815,15 +1815,16 @@ class Markdown:
">backtick")
self.inlinePatterns.add("reference",
ReferencePattern(REFERENCE_RE, self), ">escape")
- self.inlinePatterns.add("link", LinkPattern(LINK_RE), ">reference")
- self.inlinePatterns.add("image_link", ImagePattern(IMAGE_LINK_RE),
+ self.inlinePatterns.add("link", LinkPattern(LINK_RE, self),
+ ">reference")
+ self.inlinePatterns.add("image_link", ImagePattern(IMAGE_LINK_RE, self),
">link")
self.inlinePatterns.add("image_reference",
ImageReferencePattern(IMAGE_REFERENCE_RE, self),
">image_link")
- self.inlinePatterns.add("autolink", AutolinkPattern(AUTOLINK_RE),
+ self.inlinePatterns.add("autolink", AutolinkPattern(AUTOLINK_RE, self),
">image_reference")
- self.inlinePatterns.add("automail", AutomailPattern(AUTOMAIL_RE),
+ self.inlinePatterns.add("automail", AutomailPattern(AUTOMAIL_RE, self),
">autolink")
self.inlinePatterns.add("linebreak2",
SubstituteTagPattern(LINE_BREAK_2_RE, 'br'),