aboutsummaryrefslogtreecommitdiffstats
path: root/markdown
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2016-09-23 19:33:56 -0400
committerWaylan Limberg <waylan.limberg@icloud.com>2016-09-23 19:33:56 -0400
commit4747cf794b03920153a10ee7a8dd53011bf4802f (patch)
tree9388dce725f4338765832afd77eaf702da770b94 /markdown
parent435bb72fb440c2349bc7c59ff1726cbcde4f15f5 (diff)
downloadmarkdown-4747cf794b03920153a10ee7a8dd53011bf4802f.tar.gz
markdown-4747cf794b03920153a10ee7a8dd53011bf4802f.tar.bz2
markdown-4747cf794b03920153a10ee7a8dd53011bf4802f.zip
Don't allow equal signs in attr_list keys.
This will probably not result in the output intending by the author, but the syntax would be incorrect so the author needs to edit the document anyway. We just need to ensure the parser does not crash here. Fixes #498.
Diffstat (limited to 'markdown')
-rw-r--r--markdown/extensions/attr_list.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py
index de39944..8735538 100644
--- a/markdown/extensions/attr_list.py
+++ b/markdown/extensions/attr_list.py
@@ -53,9 +53,9 @@ def _handle_word(s, t):
return t, t
_scanner = Scanner([
- (r'[^ ]+=".*?"', _handle_double_quote),
- (r"[^ ]+='.*?'", _handle_single_quote),
- (r'[^ ]+=[^ =]+', _handle_key_value),
+ (r'[^ =]+=".*?"', _handle_double_quote),
+ (r"[^ =]+='.*?'", _handle_single_quote),
+ (r'[^ =]+=[^ =]+', _handle_key_value),
(r'[^ =]+', _handle_word),
(r' ', None)
])