File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ public function entity_decode($str, $charset='UTF-8')
513
513
$ str_compare = $ str ;
514
514
515
515
// Decode standard entities, avoiding false positives
516
- if ($ c = preg_match_all ('/&[a-z]{2,}(?![a-z;])/i ' , $ str , $ matches ))
516
+ if (preg_match_all ('/\ &[a-z]{2,}(?![a-z;])/i ' , $ str , $ matches ))
517
517
{
518
518
if ( ! isset ($ _entities ))
519
519
{
@@ -538,7 +538,7 @@ public function entity_decode($str, $charset='UTF-8')
538
538
539
539
$ replace = array ();
540
540
$ matches = array_unique (array_map ('strtolower ' , $ matches [0 ]));
541
- for ($ i = 0 ; $ i < $ c ; $ i ++)
541
+ for ($ i = 0 , $ c = count ( $ matches ) ; $ i < $ c ; $ i ++)
542
542
{
543
543
if (($ char = array_search ($ matches [$ i ].'; ' , $ _entities , TRUE )) !== FALSE )
544
544
{
You can’t perform that action at this time.
0 commit comments