This commit is contained in:
Fabien Potencier 2014-09-16 07:12:27 +02:00
parent 036726cf62
commit 4fd0cf3927
1 changed files with 1 additions and 3 deletions

View File

@ -48,9 +48,7 @@ class XliffFileDumper extends FileDumper
$s->appendChild($dom->createTextNode($source));
// Does the target contain characters requiring a CDATA section?
$text = (1 === preg_match('/[&<>]/', $target))
? $dom->createCDATASection($target)
: $dom->createTextNode($target);
$text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target);
$t = $translation->appendChild($dom->createElement('target'));
$t->appendChild($text);