We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9144d0f commit 0c05438Copy full SHA for 0c05438
lib/markdown2.py
@@ -2164,11 +2164,14 @@ def _encode_amps_and_angles(self, text):
2164
text = self._naked_gt_re.sub('>', text)
2165
return text
2166
2167
- _incomplete_tags_re = re.compile("<(/?\w+?(?!://).?[\s/]+?)")
+ _incomplete_tags_re = re.compile("<(/?\w+?(?!\w).+?[\s/]+?)")
2168
2169
def _encode_incomplete_tags(self, text):
2170
if self.safe_mode not in ("replace", "escape"):
2171
2172
+
2173
+ if text.endswith(">"):
2174
+ return text # this is not an incomplete tag, this is a link in the form <http://x.y.z>
2175
2176
return self._incomplete_tags_re.sub("<\\1", text)
2177
0 commit comments