Skip to content

Commit

Permalink
Update export_helper.php
Browse files Browse the repository at this point in the history
Data corruption: #11950 Data corrupts buy copy survey. unconditional stripping of ']]>' at line 611
  • Loading branch information
BertHankes committed Nov 25, 2016
1 parent 91a7d05 commit bae8331
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/export_helper.php
Expand Up @@ -608,7 +608,7 @@ function buildXMLFromQuery($xmlwriter, $Query, $tagname='', $excludes = array())
if (!$xmlwriter->startElement($Key)) safeDie('Invalid element key: '.$Key);
// Remove invalid XML characters
if ($Value!=='') {
$Value=str_replace(']]>','',$Value);
$Value=str_replace(']]>','',$Value); //asshank BertHankes: see #11950... data curruption!
$xmlwriter->writeCData(preg_replace('/[^\x9\xA\xD\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/u','',$Value));
}
$xmlwriter->endElement();
Expand Down

0 comments on commit bae8331

Please sign in to comment.