From d636030d745e002eab3426211d2aed78ecf3d987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Mon, 20 Jul 2026 15:22:15 -0300 Subject: [PATCH] Fix incomplete entity reference work around. --- scripts/text-entities.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); }