after discussion with Eloy: Always strip controlchars in xml_tag_safe_content

This commit is contained in:
mjollnir_
2006-01-16 09:07:30 +00:00
parent bd905b4568
commit b22008bae0
+1 -3
View File
@@ -463,9 +463,7 @@
//If enabled, we strip all the control chars from the text but tabs, newlines and returns
//because they are forbiden in XML 1.0 specs. The expression below seems to be
//UTF-8 safe too because it simply ignores the rest of characters.
if (!empty($CFG->backup_strip_controlchars)) {
$content = preg_replace("/(?(?=[[:cntrl:]])[^\n\r\t])/is","",$content);
}
$content = preg_replace("/(?(?=[[:cntrl:]])[^\n\r\t])/is","",$content);
if (!empty($CFG->unicodedb)) {
// Don't perform the conversion. Contents are Unicode.
$content = preg_replace("/\r\n|\r/", "\n", htmlspecialchars($content));