Skip to content

Commit 982980a

Browse files
authored
Fix incomplete entity reference work around. (#323)
1 parent 9391318 commit 982980a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/text-entities.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function loadEntityGroup( string $path )
329329
{
330330
$path = realpath( $path );
331331
$text = file_get_contents( $path );
332-
$text = str_replace( "&" , "&" , $text );
332+
$text = str_replace( '&' , '&' , $text );
333333

334334
$dom = new DOMDocument( '1.0' , 'utf8' );
335335
if ( ! $dom->loadXML( $text ) )
@@ -371,6 +371,7 @@ function loadEntityGroup( string $path )
371371
$text = "";
372372
foreach( $other->childNodes as $node )
373373
$text .= $other->saveXML( $node );
374+
$text = str_replace( '&' , '&' , $text );
374375

375376
Entities::put( $path , $name , $text , $unique , $remove );
376377
}

0 commit comments

Comments
 (0)