From d6fc8917a347e0adf9bdaab9ac00a66bf7aa7fc5 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Mon, 3 Feb 2014 15:10:37 +0100 Subject: Removed quote conversion to entity inside content Encoding quotes inside element contents may be not necessary --- src/HTML5/Serializer/OutputRules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php index bc57346..15e6c6e 100644 --- a/src/HTML5/Serializer/OutputRules.php +++ b/src/HTML5/Serializer/OutputRules.php @@ -245,7 +245,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface { * The encoded text. */ protected function enc($text) { - $flags = ENT_QUOTES; + $flags = 0; // Escape rather than encode all entities. if (!$this->encode) { @@ -254,7 +254,7 @@ class OutputRules implements \HTML5\Serializer\RulesInterface { // If we are in PHP 5.4+ we can use the native html5 entity functionality. if (defined('ENT_HTML5')) { - $flags = ENT_HTML5 | ENT_SUBSTITUTE | ENT_QUOTES; + $flags = ENT_HTML5 | ENT_SUBSTITUTE; $ret = htmlentities($text, $flags, 'UTF-8', FALSE); } // If a version earlier than 5.4 html5 entities are not entirely handled. -- cgit v1.2.3