From ce2f34e3db4679df276bdc4e5bf72259f92a4c5b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 22 Aug 2016 15:36:53 +0200 Subject: [PATCH] Removing nbsp from input strings --- .../system/html/input/node/HtmlInputNodeTextParser.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php index c8f8593969..4d6102ab3c 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php @@ -159,6 +159,11 @@ class HtmlInputNodeTextParser { $node = $nodes[$i]; $oldValue = $value = $node->textContent; + // this extra step ensures we don't trip over some random + //   inserted by the editor and at the same time + // gets rid of them afterwards + $value = preg_replace('~\x{00A0}~u', ' ', $value); + if (!empty($users)) { $value = $this->parseMention($node, $value, $users); } -- 2.20.1