Skip to content

Commit

Permalink
AtomGenerator: use native XML escape
Browse files Browse the repository at this point in the history
Let's rely on the std functions instead of hacking ours.

Bug: https://phabricator.wikimedia.org/T301655
  • Loading branch information
Tpt committed Feb 15, 2022
1 parent d1241f5 commit b39421a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Generator/AtomGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ private function addNode( DOMDocument $dom, DOMElement $head, $name, $value, $ty
return;
}

$node = $dom->createElement( $name, str_replace( '&', '&', $value ) );
$node = $dom->createElement( $name );
$node->textContent = $value;

if ( $type !== '' ) {
$node->setAttribute( 'xsi:type', $type );
Expand Down

0 comments on commit b39421a

Please sign in to comment.