From: Alexander Ebert Date: Mon, 22 Aug 2016 13:36:53 +0000 (+0200) Subject: Removing nbsp from input strings X-Git-Tag: 3.0.0_Beta_1~583 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce2f34e3db4679df276bdc4e5bf72259f92a4c5b;p=GitHub%2FWoltLab%2FWCF.git Removing nbsp from input strings --- 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); }