diff --git a/scripts/text-entities.php b/scripts/text-entities.php index a1306dbd3c..19bfea8d03 100644 --- a/scripts/text-entities.php +++ b/scripts/text-entities.php @@ -329,7 +329,7 @@ function loadEntityGroup( string $path ) { $path = realpath( $path ); $text = file_get_contents( $path ); - $text = str_replace( "&" , "&" , $text ); + $text = str_replace( '&' , '&' , $text ); $dom = new DOMDocument( '1.0' , 'utf8' ); if ( ! $dom->loadXML( $text ) ) @@ -371,6 +371,7 @@ function loadEntityGroup( string $path ) $text = ""; foreach( $other->childNodes as $node ) $text .= $other->saveXML( $node ); + $text = str_replace( '&' , '&' , $text ); Entities::put( $path , $name , $text , $unique , $remove ); }