chrisisbeef / jquery-encoder

Contextual Output Encoding for jQuery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider splitting out jQuery dependency?

stilliard opened this issue · comments

We could split this lib out so that the core of it could be used as functions in pure javascript without need for jQuery, and then still offer the jQuery methods for when jQuery is in use?

That's not a bad idea - wrappers for other frameworks outside of jQuery could be provided then.

Yer that would be awesome.
Looking through the main use of jQuery in the core functions, it seems to be $.inArray() used a few times, a call to $.text() followed by $.html() in encodeForHTML(), and the rest appears to be more about exposing the methods in jQuery. So it might not be a big job to do.