aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2011-06-02 03:13:15 -0400
committerWaylan Limberg <waylan@gmail.com>2011-06-02 03:13:15 -0400
commit029bd9dd01258aca69f53470bde906a635412057 (patch)
tree8be217798f8baaaaa3b5632e7257f8ccc055ce27
parent0426d274b534c7f600cd76ef4b77f4b0c62a4c93 (diff)
downloadmarkdown-029bd9dd01258aca69f53470bde906a635412057.tar.gz
markdown-029bd9dd01258aca69f53470bde906a635412057.tar.bz2
markdown-029bd9dd01258aca69f53470bde906a635412057.zip
Minor adjustment to previous commit. Reference links don't need unescaped as they are removed before escaping takes place. Related to issue #14.
-rw-r--r--markdown/inlinepatterns.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py
index 4f45638..6cec968 100644
--- a/markdown/inlinepatterns.py
+++ b/markdown/inlinepatterns.py
@@ -366,9 +366,9 @@ class ReferencePattern(LinkPattern):
def makeTag(self, href, title, text):
el = util.etree.Element('a')
- el.set('href', self.sanitize_url(self.unescape(href)))
+ el.set('href', self.sanitize_url(href))
if title:
- el.set('title', self.unescape(title))
+ el.set('title', title)
el.text = text
return el
@@ -378,9 +378,9 @@ class ImageReferencePattern(ReferencePattern):
""" Match to a stored reference and return img element. """
def makeTag(self, href, title, text):
el = util.etree.Element("img")
- el.set("src", self.sanitize_url(self.unescape(href)))
+ el.set("src", self.sanitize_url(href))
if title:
- el.set("title", self.unescape(title))
+ el.set("title", title)
el.set("alt", text)
return el