Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(unescape-bug): Fixed bug where intermediate string contains escaped characters #1835

Merged
merged 2 commits into from
Oct 30, 2021

Conversation

Marcholio
Copy link
Contributor

Fixes: #1827

If the intermediate string contains escape sequences, eg. unescaping &amp;lt; resulted in incorrect output <. Moved & unescape as last operation to handle all other sequences before that.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable) - not applicable
  • Tests written (where applicable)

@codecov
Copy link

codecov bot commented Oct 29, 2021

Codecov Report

Merging #1835 (d799421) into master (13651ea) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1835   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         2029      2038    +9     
  Branches       457       460    +3     
=========================================
+ Hits          2029      2038    +9     
Impacted Files Coverage Δ
src/lib/unescape.js 100.00% <100.00%> (ø)
src/lib/isFQDN.js 100.00% <0.00%> (ø)
src/lib/isPostalCode.js 100.00% <0.00%> (ø)
src/lib/isMobilePhone.js 100.00% <0.00%> (ø)
src/lib/isIdentityCard.js 100.00% <0.00%> (ø)
src/lib/isLicensePlate.js 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13651ea...d799421. Read the comment docs.

fedeci
fedeci previously approved these changes Oct 29, 2021
src/lib/unescape.js Show resolved Hide resolved
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! 🎉

@profnandaa profnandaa merged commit 3fcf768 into validatorjs:master Oct 30, 2021
@Marcholio Marcholio deleted the fix/unescape branch October 30, 2021 09:47
theteladras pushed a commit to theteladras/validator.js that referenced this pull request Oct 30, 2021
…haracters (validatorjs#1835)

* Fixed bug where intermediate string contains escaped characters

* Added reference to issue

Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Markus <[email protected]>
profnandaa pushed a commit that referenced this pull request Oct 31, 2021
…haracters (#1835)

* Fixed bug where intermediate string contains escaped characters

* Added reference to issue

Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Markus <[email protected]>
profnandaa pushed a commit that referenced this pull request Oct 31, 2021
…haracters (#1835)

* Fixed bug where intermediate string contains escaped characters

* Added reference to issue

Co-authored-by: Markus Tyrkkö <[email protected]>
Co-authored-by: Markus <[email protected]>
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.

Incorrect results in unescape
3 participants