Skip to content

Commit

Permalink
after discussion with Eloy: Always strip controlchars in xml_tag_safe…
Browse files Browse the repository at this point in the history
…_content
  • Loading branch information
mjollnir_ committed Jan 16, 2006
1 parent bd905b4 commit b22008b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backup/backuplib.php
Expand Up @@ -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));
Expand Down

0 comments on commit b22008b

Please sign in to comment.