Skip to content

Commit

Permalink
Fixed issue #7060: Group export on creates invalid file on Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Dec 11, 2012
1 parent 82c2522 commit 27f7e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/export_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ function buildXMLFromQuery($xmlwriter, $Query, $tagname='', $excludes = array())
$Key=str_replace('#','-',$Key);
if (!$xmlwriter->startElement($Key)) safeDie('Invalid element key: '.$Key);
// Remove invalid XML characters
if ($Value!='') {
if ($Value!=='') {
$Value=str_replace(']]>','',$Value);
$xmlwriter->writeCData(preg_replace('/[^\x9\xA\xD\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/u','',$Value));
}
Expand Down

0 comments on commit 27f7e62

Please sign in to comment.