-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Escape characters when generating file name for saving web page resou…
…rces https://bugs.webkit.org/show_bug.cgi?id=267286 rdar://120501555 Reviewed by Ryosuke Niwa and BJ Burg. In existing implementation, file names generated for saved web page resources could contain '%' or other characters that need to be encoded for URI. That means, when rewritting subresources URLs in the saved files, we have to encode file name properly. To avoid this trouble, this patch generates file names that only contains unreserved characters for URI (RFC 3986), which do not need to be percent-encoded in any case, and compatible with file system. Updated API test: WebArchive.SaveResourcesValidFileName * Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp: (WebCore::isUnreservedURICharacter): (WebCore::getFileNameFromURIComponent): (WebCore::generateValidFileName): * Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm: Canonical link: https://commits.webkit.org/272880@main
- Loading branch information
Showing
2 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters