From 0c1305a9ca6b900755a46c72cb1613a55277a7a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 1 Jun 2015 20:53:10 +0200 Subject: [PATCH] HTML::Util: "nbsp" als HTML-Entity durch " " (space) ersetzen. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit "nbsp" wird hier zu space, obwohl U+00A0 (non-breaking space) richtig wäre. non-breaking space kann allerdings zu schwer zu findenden Fehlern zum Beispiel beim CSV-Export führen, wenn ein Benutzer dieses nicht sichtbare Zeichen dann per cut-and-paste irgendwo einfügt. --- SL/HTML/Util.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SL/HTML/Util.pm b/SL/HTML/Util.pm index c62fd9202..f68fb0a1f 100644 --- a/SL/HTML/Util.pm +++ b/SL/HTML/Util.pm @@ -7,9 +7,11 @@ use HTML::Parser; my %stripper; my %entities = ( - 'lt' => '<', - 'gt' => '>', - 'amp' => '&', + 'lt' => '<', + 'gt' => '>', + 'amp' => '&', + 'nbsp' => ' ', # should be => "\x{00A0}", but this can lead to problems with + # a non-visible character in csv-exports for example ); sub strip { -- 2.20.1