-
Notifications
You must be signed in to change notification settings - Fork 294
Fix #11 by escaping enough to be safe in legacy browsers #95
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 #11 by escaping enough to be safe in legacy browsers #95
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/227 This is an external review system which you may optionally use for the code review of your pull request. |
The remaining failures are now-bogus tests in html5lib-tests (which expect spec behaviour by default, and not legacy-safe behaviour by default (which we want because of #12 — to be secure by default)). |
b0eddff
to
791533e
Compare
791533e
to
d87ca9b
Compare
d87ca9b
to
6ddce87
Compare
Current coverage is 89.37%@@ master #95 diff @@
==========================================
Files 50 50
Lines 6796 6809 +13
Methods 0 0
Messages 0 0
Branches 1318 1321 +3
==========================================
+ Hits 6071 6085 +14
+ Misses 555 553 -2
- Partials 170 171 +1
|
… per spec This also moves to using re, which seems far cleaner than the reduce-based search previously used.
a30eb28
to
15ff801
Compare
…legacy browsers These are mostly out of the market now, so this isn't massively needed any more; nevertheless, avoiding XSS as much as possible is inevitably desirable. This alters the API so that quote_attr_values is now a ternary setting, choosing between legacy-safe behaviour, spec behaviour, and always quoting.
8765511
to
9b8d8eb
Compare
#11 given this isn't picked up from the title