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: handle backslash produced by an Unicode hex sequence #137

Closed

Conversation

fancyweb
Copy link

@fancyweb fancyweb commented Jan 9, 2023

Using the Unicode hex sequence \5c produces a \ but it is not escaped. Therefore, it ends up being treated as a simple escape.

Copy link
Member

@Gallaecio Gallaecio left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Merging #137 (7db25e7) into master (ddd9784) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
+ Coverage   95.46%   95.50%   +0.03%     
==========================================
  Files           2        3       +1     
  Lines         904      912       +8     
  Branches      161      162       +1     
==========================================
+ Hits          863      871       +8     
  Misses         24       24              
  Partials       17       17              
Impacted Files Coverage Δ
cssselect/parser.py 96.28% <100.00%> (+0.01%) ⬆️
cssselect/__init__.py 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@fancyweb
Copy link
Author

Please don't merge yet because it doesn't fix all the cases (thanks to @MatTheCat for spotting it).
\\5c should yield \5c but would yield \\ (currently it yields \ btw).

@fancyweb fancyweb marked this pull request as draft January 12, 2023 10:28
@fancyweb fancyweb closed this Oct 19, 2023
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.

None yet

2 participants