Permalink
Browse files

[markdown mode] Be somewhat more restrictive about HTML open tags

Closes #4484
  • Loading branch information...
1 parent d4e2e7a commit 3a83dccdfa96e2dc90c3129d281525ff41241255 @marijnh marijnh committed Jan 4, 2017
Showing with 1 addition and 1 deletion.
  1. +1 −1 mode/markdown/markdown.js
@@ -490,7 +490,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
return type + tokenTypes.linkEmail;
}
- if (ch === '<' && stream.match(/^(!--|\w)/, false)) {
+ if (ch === '<' && stream.match(/^(!--|[a-z]+(?:\s+[a-z_:.\-]+(?:\s*=\s*[^ >]+)?)*\s*>)/i, false)) {
var end = stream.string.indexOf(">", stream.pos);
if (end != -1) {
var atts = stream.string.substring(stream.start, end);

0 comments on commit 3a83dcc

Please sign in to comment.