From: sgunderson@bigfoot.com <> Date: Sat, 26 Apr 2008 17:46:27 +0000 (+0200) Subject: Improve the HTML-entity-magic a bit for PHP5. X-Git-Url: https://git.sesse.net/?p=xml-template;a=commitdiff_plain;h=e917db04f37ab3be79a0634a5ef22358d35a9075 Improve the HTML-entity-magic a bit for PHP5. --- diff --git a/php5/xml-template.php b/php5/xml-template.php index 46047ff..b28db15 100644 --- a/php5/xml-template.php +++ b/php5/xml-template.php @@ -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("/&/", "&", $attr->value); $newnode->appendChild($attr2); } }