aantron / lambdasoup

Functional HTML scraping and rewriting with CSS in OCaml
https://aantron.github.io/lambdasoup
MIT License
380 stars 31 forks source link

Support escaped selectors and document it #27

Closed Chris00 closed 4 years ago

Chris00 commented 4 years ago

In view of this issue about selectors containing a colon, it would be nice to make sure that lambdasoup supports selectors with escape sequences and to document it (so it is clear to the users).

aantron commented 4 years ago

Lambda Soup now supports escape sequences in selector identifiers. In particular, see this new test for escaped colons:

https://github.com/aantron/lambdasoup/blob/b53b69f721fd59beb62b7e7a42eb0943e967d179/test/test.ml#L179

https://github.com/aantron/lambdasoup/blob/b53b69f721fd59beb62b7e7a42eb0943e967d179/test/pages/quoted.html#L17