From 19c0131f0383f96c02a840a782480f992609d3d6 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sat, 13 Mar 2021 01:28:43 -0700 Subject: [PATCH] Markdown.pl: do not choke on \n inside attribute values A tag such as this: Is perfectly valid. Add the missing "s" pattern match qualifier to make sure such attribute values do not end up getting mangled. Signed-off-by: Kyle J. McKay --- Markdown.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Markdown.pl b/Markdown.pl index 350909f..54fe26a 100755 --- a/Markdown.pl +++ b/Markdown.pl @@ -3734,7 +3734,7 @@ sub _SanitizeAtt { sub _SanitizeAttValue { my $v = shift; - if ($v =~ /^([\042\047])(.*?)\1$/) { + if ($v =~ /^([\042\047])(.*?)\1$/s) { return $1.escapeXML($2).$1; } else { return '"'.escapeXML($v).'"';