Implement "Followup improvements for ext/uri" RFC - WHATWG URL percent-encoding#22820
Open
kocsismate wants to merge 1 commit into
Open
Implement "Followup improvements for ext/uri" RFC - WHATWG URL percent-encoding#22820kocsismate wants to merge 1 commit into
kocsismate wants to merge 1 commit into
Conversation
kocsismate
commented
Jul 20, 2026
| #define LXB_URL_BUFFER_NUM_SIZE 128 | ||
|
|
||
|
|
||
| typedef enum { |
Member
Author
There was a problem hiding this comment.
these changes to lexbor will be proposed upstream after the first review iteration
kocsismate
commented
Jul 20, 2026
| } | ||
|
|
||
| memcpy(lexbor_custom_url_map, lxb_url_map, sizeof(lxb_url_map)); | ||
| lexbor_custom_url_map[37] = -1; /* % is percent-encoded */ |
Member
Author
There was a problem hiding this comment.
the custom URL map is needed in two places:
- to percent-encode
%in all modes - WHATWG doesn't try to percent-encode% - to percent-encode
/in thePathSegmentmode - this is a custom percent-encoding mode
kocsismate
commented
Jul 20, 2026
| default: ZEND_UNREACHABLE(); | ||
| } | ||
|
|
||
| if (str == NULL) { |
Member
Author
There was a problem hiding this comment.
As far as I saw, this is not a realistic scenario, since apparently only memory errors could lead to this code path, but memory errors bail out instead.
Member
Author
There was a problem hiding this comment.
And P.S. @ndossche Would enabling ASAN support for Lexbor be useful via the LEXBOR_HAVE_ADDRESS_SANITIZER flag, wouldn't it?
Member
Author
There was a problem hiding this comment.
Filed #22826, but I didn't have time to actually test it.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC: https://wiki.php.net/rfc/uri_followup#percent-encoding_support