Skip to content

fix: Handle bad input strings to decodeURIComponent#24

Closed
fengmk2 wants to merge 2 commits intomasterfrom
fix-bad-string
Closed

fix: Handle bad input strings to decodeURIComponent#24
fengmk2 wants to merge 2 commits intomasterfrom
fix-bad-string

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Oct 28, 2023

closes #18

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 28, 2023

Codecov Report

Merging #24 (7720132) into master (8f9308f) will increase coverage by 0.25%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
+ Coverage   85.45%   85.71%   +0.25%     
==========================================
  Files           1        1              
  Lines         220      224       +4     
  Branches       53       54       +1     
==========================================
+ Hits          188      192       +4     
  Misses         32       32              
Files Coverage Δ
src/index.ts 85.71% <100.00%> (+0.25%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented Oct 28, 2023

After thinking about it, I don't want to do this by default. Users should implement this logic by adding a try catch outside of decode, and urlencode.decode still maintains the same error handling logic as decodeURIComponent in order to be compliant with the standard.

@fengmk2 fengmk2 closed this Oct 28, 2023
@fengmk2 fengmk2 deleted the fix-bad-string branch October 28, 2023 13:29
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