-
Notifications
You must be signed in to change notification settings - Fork 112
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
Sanitize css before sending to Anki #1722
Conversation
A CSS parser such as the one provided by |
The reason for adding that is I highly suspect it isn't available in kiwi browser (to avoid #1701 part 2). Full on breaking compatibility with kiwi is a no-go since so many people use it for yomitan on android. @jamesmaa if you could test if this that would be appreciated. KTY dicts are an easy test since all of the term dicts have a
It also does log the failures. |
For what it's worth, csstree seems to be standards-compliant, actively developed, and usable within a browser. Maybe it could be used to parse CSS without introducing a dependency upon new specific browser features. |
I agree we should test on kiwi, but my understanding is that:
So I think it will probably be fine. Pulling in new node deps and shipping them with the extension is best to avoid if possible. |
Prevents malformed css from making it to Anki. Browsers already sanitize css when adding it to the DOM so there's no need to add sanitization there.