File tree Expand file tree Collapse file tree
dom/tests/modern/html/encoding Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ $tests = [
4646 "text/html; ;; ; ;; Charset= \"ISO-8859-1 \"" ,
4747 "text/html;Charset= \"ISO-8859-1 " ,
4848 "tex.t/h# \$%!&'*%2B-.^_`|~tml;Charset= \"ISO-8859-1 \"" , // Note: have to encode + as 2B because of implementation details of http_server()
49+ "text/html; abcd=ef;charset=ISO-8859-1 " ,
4950 ],
5051 "Valid input, but invalid encoding name " => [
5152 "text/html;Charset= \"ISO-8859-1 \\" ,
@@ -100,6 +101,7 @@ foreach ($tests as $name => $headers) {
100101äöü
101102äöü
102103äöü
104+ äöü
103105--- Valid input, but invalid encoding name ---
104106���
105107���
Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ PHP_LIBXML_API zend_string *php_libxml_sniff_charset_from_string(const char *sta
273273 /* 11.9.1. Set parameterValue to the result of collecting a sequence of code points that are not ';' */
274274 size_t parameter_value_length = collect_a_sequence_of_code_points (start , end , is_not_semicolon );
275275 parameter_value = zend_string_init (start , parameter_value_length , false);
276- start += parameter_name_length ;
276+ start += parameter_value_length ;
277277
278278 /* 11.9.2. Remove trailing HTTP whitespace from parameterValue */
279279 while (ZSTR_LEN (parameter_value ) > 0 && is_http_whitespace (ZSTR_VAL (parameter_value )[ZSTR_LEN (parameter_value ) - 1 ])) {
You can’t perform that action at this time.
0 commit comments