WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2008 03:47:03 +0000 (03:47 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2008 03:47:03 +0000 (03:47 +0000)
commit42a68f0c700892cfa3d2da0e3b0b597e7a302857
tree7d1162062d0d3f8809a4e26d614e189fd609d2b9
parentd598887e1ebdf074809c3abaae560bf415f30947
WebCore:

2008-03-16  Marvin Decker  <marv.decker@gmail.com>

        Reviewed by Darin.

        Fix bug 15119: URL query characters that are unencodable in the
        request's character set should be converted to XML entities with
        non-alphanumeric characters escaped.

        Test: http/tests/uri/escaped-entity.html

        * html/FormDataList.cpp:
        (WebCore::FormDataList::appendString):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formData):
        * platform/KURL.cpp:
        (WebCore::encodeRelativeString):
        * platform/text/String.cpp:
        (WebCore::String::latin1):
        (WebCore::String::utf8):
        * platform/text/TextCodec.cpp:
        (WebCore::TextCodec::unencodableCharReplacement):
        * platform/text/TextCodec.h:
        (WebCore::):
        * platform/text/TextCodecICU.cpp:
        (WebCore::urlEscapedEntityCallback):
        (WebCore::gbkUrlEscapedEntityCallack):
        (WebCore::TextCodecICU::encode):
        * platform/text/TextCodecICU.h:
        (WebCore::TextCodecICU::setNeedsGBKFallbacks):
        * platform/text/TextCodecLatin1.cpp:
        (WebCore::encodeComplexWindowsLatin1):
        (WebCore::TextCodecLatin1::encode):
        * platform/text/TextCodecLatin1.h:
        * platform/text/TextCodecUTF16.cpp:
        (WebCore::TextCodecUTF16::encode):
        * platform/text/TextCodecUTF16.h:
        * platform/text/TextCodecUserDefined.cpp:
        (WebCore::encodeComplexUserDefined):
        (WebCore::TextCodecUserDefined::encode):
        * platform/text/TextCodecUserDefined.h:
        * platform/text/TextEncoding.cpp:
        (WebCore::TextEncoding::encode):
        * platform/text/TextEncoding.h:
        * platform/text/mac/TextCodecMac.cpp:
        (WebCore::TextCodecMac::encode):
        * platform/text/mac/TextCodecMac.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send):

LayoutTests:

2008-03-16  Marvin Decker  <marv.decker@gmail.com>

        Reviewed by Darin.

        Fix bug 15119, unencodable characters in URLs should be entity-escaped.

        * http/tests/uri/escaped-entity-expected.txt: Added.
        * http/tests/uri/escaped-entity.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/uri/escaped-entity-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/uri/escaped-entity.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/FormDataList.cpp
WebCore/html/HTMLFormElement.cpp
WebCore/platform/KURL.cpp
WebCore/platform/text/String.cpp
WebCore/platform/text/TextCodec.cpp
WebCore/platform/text/TextCodec.h
WebCore/platform/text/TextCodecICU.cpp
WebCore/platform/text/TextCodecICU.h
WebCore/platform/text/TextCodecLatin1.cpp
WebCore/platform/text/TextCodecLatin1.h
WebCore/platform/text/TextCodecUTF16.cpp
WebCore/platform/text/TextCodecUTF16.h
WebCore/platform/text/TextCodecUserDefined.cpp
WebCore/platform/text/TextCodecUserDefined.h
WebCore/platform/text/TextEncoding.cpp
WebCore/platform/text/TextEncoding.h
WebCore/platform/text/mac/TextCodecMac.cpp
WebCore/platform/text/mac/TextCodecMac.h
WebCore/xml/XMLHttpRequest.cpp