Commit 032b9593 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 105960: xml.cgi generates invalid XML - Patch by Kip Hampton…

Bug 105960: xml.cgi generates invalid XML - Patch by Kip Hampton <khampton@totalcinema.com> r/a=mkanat
parent 0497adba
......@@ -201,6 +201,16 @@ sub xml_quote {
$var =~ s/>/\&gt;/g;
$var =~ s/\"/\&quot;/g;
$var =~ s/\'/\&apos;/g;
# the following nukes characters disallowed by the XML 1.0
# spec, Production 2.2. 1.0 declares that only the following
# are valid:
# (#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF])
$var =~ s/([\x{0001}-\x{0008}]|
[\x{000B}-\x{000C}]|
[\x{000E}-\x{0019}]|
[\x{D800}-\x{DFFF}]|
[\x{FFFE}-\x{FFFF}])//gx;
return $var;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment