Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mozfreddyb/cse

context-sensitive escaping
https://github.com/mozfreddyb/cse

Last synced: 19 days ago
JSON representation

context-sensitive escaping

Awesome Lists containing this project

README

        

cse stands for context-sensitive escaping
========================================

context stands for the parser state when
parsing a HTML document.

escaping stands for replacing characters
so that templating input does not modify
the current context.

Example:

`var foo = \`click me\``

If you want to escape `foo` in a context-sensitive
way you need to make sure that, the parser will remain
in the "a element, href attribute" state when the input
has been processed