From c53f6b0edb492227f9aa6959c4049f5c2e2b27b3 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Wed, 24 Jan 2007 11:58:55 +0000 Subject: [PATCH] filter out non printable characters --- ND/Web/Include.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/ND/Web/Include.pm b/ND/Web/Include.pm index 367dddb..4b9c629 100644 --- a/ND/Web/Include.pm +++ b/ND/Web/Include.pm @@ -44,6 +44,7 @@ sub parseMarkup ($) { my $tree = BBCode::Parser->DEFAULT->parse($text); $text = $tree->toHTML; }; + $text =~ s/[^\x{9}\x{A}\x{D}\x{20}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//g; return $text; } -- 2.39.2