Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a2225304ef161968c443eeb6cbecbccc665010d2 https://github.com/WebKit/WebKit/commit/a2225304ef161968c443eeb6cbecbccc665010d2 Author: Richard Robinson <richard_robins...@apple.com> Date: 2023-10-10 (Tue, 10 Oct 2023)
Changed paths: M Source/WTF/wtf/PlatformHave.h M Source/WebCore/platform/ios/PlatformPasteboardIOS.mm M Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm Log Message: ----------- The textarea element URL encodes pasteboard data https://bugs.webkit.org/show_bug.cgi?id=261936 rdar://116056298 Reviewed by Wenson Hsieh. In iOS 17 and aligned OS versions, `+[NSURL URLWithString:]` now percent-encodes invalid characters to help create a valid URL, where previously it would return `nil`. As a result of this new behavior, strings are now made representable as URLs more easily, and so their URL representations are added to the pasteboard with percent-encoded invalid characters. Fix by using the new `+[NSURL URLWithString:encodingInvalidCharacters:]` method, which restores pre-iOS 17 behavior. * Source/WTF/wtf/PlatformHave.h: * Source/WebCore/platform/ios/PlatformPasteboardIOS.mm: (WebCore::addRepresentationsForPlainText): * Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/269178@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes