]> git.sesse.net Git - xml-template/commitdiff
Improve the HTML-entity-magic a bit for PHP5.
authorsgunderson@bigfoot.com <>
Sat, 26 Apr 2008 17:46:27 +0000 (19:46 +0200)
committersgunderson@bigfoot.com <>
Sat, 26 Apr 2008 17:46:27 +0000 (19:46 +0200)
php5/xml-template.php

index 46047ff8ff27730c09bdc5c91a4d91a6695b93e2..b28db156ebf2cf6e6ffe1f637a3b579a299e7df8 100644 (file)
@@ -209,7 +209,7 @@ function own_clone_element($node, $doc)
                        }
 
                        # You've got to be kidding me...
-                       $attr2->value = htmlentities($attr->value);
+                       $attr2->value = preg_replace("/&/", "&amp;", $attr->value);
                        $newnode->appendChild($attr2);
                }
        }