]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #1103 from dennisverspuij/fix-on-in-markdown
authorArthurHoaro <arthur@hoa.ro>
Mon, 26 Mar 2018 16:55:41 +0000 (18:55 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Mar 2018 16:55:41 +0000 (18:55 +0200)
 Fix removal of on=... attributes from html (generated from markdown)

plugins/markdown/markdown.php

index 6b4aabf3ae8ad6798ab40bb12ba8b499c7b13609..2f24e4172b1d3c66ca1eb0f1a9bf66ed4ecde606 100644 (file)
@@ -288,7 +288,7 @@ function sanitize_html($description)
             $description);
     }
     $description = preg_replace(
-        '#(<[^>]+)on[a-z]*="?[^ "]*"?#is',
+        '#(<[^>]+\s)on[a-z]*="?[^ "]*"?#is',
         '$1',
         $description);
     return $description;