From b22008bae03fd53956cd120fea9562d5c53de095 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Mon, 16 Jan 2006 09:07:30 +0000 Subject: [PATCH] after discussion with Eloy: Always strip controlchars in xml_tag_safe_content --- backup/backuplib.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backup/backuplib.php b/backup/backuplib.php index cadd94a37afb8..a811453aa3997 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -463,9 +463,7 @@ function xml_tag_safe_content($content) { //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));