code = strtol(p + 2, &next, 10);
}
- if (code == 39 && !(quote_style & ENT_HTML_QUOTE_SINGLE) ||
- code == 24 && !(quote_style & ENT_HTML_QUOTE_DOUBLE)) {
+ if (code == '\'' && !(quote_style & ENT_HTML_QUOTE_SINGLE) ||
+ code == '"' && !(quote_style & ENT_HTML_QUOTE_DOUBLE)) {
invalid_code = 1;
}
--FILE--\r
<?php\r
var_dump(unpack("H*",html_entity_decode("é", ENT_QUOTES, "ISO-8859-1")));\r
+echo "double quotes variations:", "\n";\r
+echo html_entity_decode(""", ENT_NOQUOTES, 'UTF-8'), "\n";\r
+echo html_entity_decode(""", ENT_NOQUOTES, 'UTF-8'), "\n";\r
+echo html_entity_decode(""", ENT_QUOTES, 'UTF-8'), "\n";\r
+echo html_entity_decode(""", ENT_QUOTES, 'UTF-8'), "\n";\r
+echo html_entity_decode(""", ENT_COMPAT, 'UTF-8'), "\n";\r
+echo html_entity_decode(""", ENT_COMPAT, 'UTF-8'), "\n";\r
+\r
+echo "\nsingle quotes variations:", "\n";\r
+echo html_entity_decode("'", ENT_NOQUOTES, 'UTF-8'), "\n";\r
+echo html_entity_decode("'", ENT_QUOTES, 'UTF-8'), "\n";\r
+echo html_entity_decode("'", ENT_COMPAT, 'UTF-8'), "\n";\r
--EXPECT--\r
array(1) {\r
[1]=>\r
string(2) "e9"\r
}\r
+double quotes variations:\r
+"\r
+"\r
+"\r
+"\r
+"\r
+"\r
+\r
+single quotes variations:\r
+'\r
+'\r
+'\r