From 75bf6d0184c75cdaa0bbc996a5f9aaae63988846 Mon Sep 17 00:00:00 2001 From: Rainbow Spike <3947636+Rainbow-Spike@users.noreply.github.com> Date: Fri, 17 Jun 2022 21:38:53 +0900 Subject: [PATCH] tag string clearing --- syntax/tag.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syntax/tag.php b/syntax/tag.php index dc8bce5..b43b986 100644 --- a/syntax/tag.php +++ b/syntax/tag.php @@ -46,7 +46,9 @@ function connectTo($mode) { */ function handle($match, $state, $pos, Doku_Handler $handler) { $tags = trim(substr($match, 6, -2)); // strip markup & whitespace + $tags = trim($tags, "\xe2\x80\x8b"); // strip word/wordpad breaklines $tags = preg_replace(array('/[[:blank:]]+/', '/\s+/'), " ", $tags); // replace linebreaks and multiple spaces with one space character + $tags = preg_replace('/[\x00-\x1F\x7F]/u', '', $tags); // strip unprintable ascii code out of utf-8 coded string if (!$tags) return false;