Fix an error in markdown2.py transformation, : character doesn't need to be encoded when converting an URL
This commit is contained in:
parent
2bd6f8ae21
commit
c5744585c7
|
@ -1273,7 +1273,7 @@ class Markdown(object):
|
|||
if is_inline_img:
|
||||
img_class_str = ' class="inlineimage"'
|
||||
result = '<img src="%s" alt="%s"%s%s%s' \
|
||||
% (urllib.parse.quote(url),
|
||||
% (urllib.parse.quote(url, safe=':/'),
|
||||
_xml_escape_attr(link_text),
|
||||
title_str, img_class_str, self.empty_element_suffix)
|
||||
if "smarty-pants" in self.extras:
|
||||
|
@ -1323,7 +1323,7 @@ class Markdown(object):
|
|||
if is_img:
|
||||
img_class_str = self._html_class_str_from_tag("img")
|
||||
result = '<img src="%s" alt="%s"%s%s%s' \
|
||||
% (urllib.parse.quote(url),
|
||||
% (urllib.parse.quote(url, safe=':/'),
|
||||
link_text.replace('"', '"'),
|
||||
title_str, img_class_str, self.empty_element_suffix)
|
||||
if "smarty-pants" in self.extras:
|
||||
|
|
Loading…
Reference in New Issue
Block a user