Loading content/html/content/src/nsFormSubmission.cpp +10 −8 Original line number Diff line number Diff line Loading @@ -718,15 +718,8 @@ nsEncodingFormSubmission::nsEncodingFormSubmission(const nsACString& aCharset, charset.AssignLiteral("windows-1252"); } // use UTF-8 for UTF-16* (per WHATWG and existing practice of // MS IE/Opera). if (StringBeginsWith(charset, NS_LITERAL_CSTRING("UTF-16"))) { charset.AssignLiteral("UTF-8"); } if (!(charset.EqualsLiteral("UTF-8") || charset.EqualsLiteral("gb18030"))) { nsAutoString charsetUtf16; CopyUTF8toUTF16(charset, charsetUtf16); NS_ConvertUTF8toUTF16 charsetUtf16(charset); const PRUnichar* charsetPtr = charsetUtf16.get(); SendJSWarning(aOriginatingElement ? aOriginatingElement->GetOwnerDocument() : nsnull, Loading Loading @@ -869,6 +862,15 @@ GetSubmissionFromForm(nsGenericHTMLElement* aForm, nsCAutoString charset; GetSubmitCharset(aForm, charset); // We now have a canonical charset name, so we only have to check it // against canonical names. // use UTF-8 for UTF-16* (per WHATWG and existing practice of // MS IE/Opera). if (StringBeginsWith(charset, NS_LITERAL_CSTRING("UTF-16"))) { charset.AssignLiteral("UTF-8"); } // Choose encoder if (method == NS_FORM_METHOD_POST && enctype == NS_FORM_ENCTYPE_MULTIPART) { Loading content/html/content/test/Makefile.in +1 −0 Original line number Diff line number Diff line Loading @@ -272,6 +272,7 @@ _TEST_FILES = \ test_bug674558.html \ test_bug583533.html \ test_restore_from_parser_fragment.html \ test_bug615595.html \ test_bug617528.html \ test_bug660959-1.html \ test_bug660959-2.html \ Loading content/html/content/test/test_bug615595.html 0 → 100644 +0 −0 File added.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View file Loading
content/html/content/src/nsFormSubmission.cpp +10 −8 Original line number Diff line number Diff line Loading @@ -718,15 +718,8 @@ nsEncodingFormSubmission::nsEncodingFormSubmission(const nsACString& aCharset, charset.AssignLiteral("windows-1252"); } // use UTF-8 for UTF-16* (per WHATWG and existing practice of // MS IE/Opera). if (StringBeginsWith(charset, NS_LITERAL_CSTRING("UTF-16"))) { charset.AssignLiteral("UTF-8"); } if (!(charset.EqualsLiteral("UTF-8") || charset.EqualsLiteral("gb18030"))) { nsAutoString charsetUtf16; CopyUTF8toUTF16(charset, charsetUtf16); NS_ConvertUTF8toUTF16 charsetUtf16(charset); const PRUnichar* charsetPtr = charsetUtf16.get(); SendJSWarning(aOriginatingElement ? aOriginatingElement->GetOwnerDocument() : nsnull, Loading Loading @@ -869,6 +862,15 @@ GetSubmissionFromForm(nsGenericHTMLElement* aForm, nsCAutoString charset; GetSubmitCharset(aForm, charset); // We now have a canonical charset name, so we only have to check it // against canonical names. // use UTF-8 for UTF-16* (per WHATWG and existing practice of // MS IE/Opera). if (StringBeginsWith(charset, NS_LITERAL_CSTRING("UTF-16"))) { charset.AssignLiteral("UTF-8"); } // Choose encoder if (method == NS_FORM_METHOD_POST && enctype == NS_FORM_ENCTYPE_MULTIPART) { Loading
content/html/content/test/Makefile.in +1 −0 Original line number Diff line number Diff line Loading @@ -272,6 +272,7 @@ _TEST_FILES = \ test_bug674558.html \ test_bug583533.html \ test_restore_from_parser_fragment.html \ test_bug615595.html \ test_bug617528.html \ test_bug660959-1.html \ test_bug660959-2.html \ Loading
content/html/content/test/test_bug615595.html 0 → 100644 +0 −0 File added.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View file