From: Michael Andreen Date: Wed, 24 Jan 2007 11:58:55 +0000 (+0000) Subject: filter out non printable characters X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=c53f6b0edb492227f9aa6959c4049f5c2e2b27b3;p=ndwebbie.git filter out non printable characters --- 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; }