Skip to content

Fix for notReallyPercentEncode#24

Open
enriched wants to merge 1 commit intogeraintluff:masterfrom
enriched:master
Open

Fix for notReallyPercentEncode#24
enriched wants to merge 1 commit intogeraintluff:masterfrom
enriched:master

Conversation

@enriched
Copy link
Copy Markdown

@enriched enriched commented Feb 9, 2018

notReallyPercentEncode was ignoring double encoded things that ended with a letter.

notReallyPercentEncode was ignoring double encoded things that ended with a letter.
@jwalton
Copy link
Copy Markdown

jwalton commented Apr 11, 2018

Why not /%25[0-9a-fA-F][0-9a-fA-F]/g? What is this doing exactly? :P

@enriched
Copy link
Copy Markdown
Author

enriched commented Apr 20, 2018

This function is trying to undo percent encoded stuff that got percent encoded again. So the regex is meant to match things that are are percent encoded (start with the % character) followed by the hexadecimal value for percent (25), followed by a hexadecimal ascii character [0-9][0-9a-fA-F]. I am not sure if it makes a difference if you allow [0-9a-fA-F] on the first character, but the [0-9] should match a character that has been encoded.

It would probably be even better to only match the hexadecimal of characters that get encoded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants