jejacks0n/mercury — comment on commit 575e4451383502251f10512cecdf85dffb847d33
File: vendor/assets/javascripts/mercury.js line 254
By jejacks0n:

So, as part of this commit I included the jQuery.htmlClean plugin. as a follow up I was considering using this in addition to the whitelist functionality you provided. You could simply provide options for the html clean plugin instead of a whitelist.

Sanitizing would be exposed in a few ways.. The first would be in paste, followed up with a way to make a selection and then sanitize that selection, and eventually getting it working fully with the edit html stuff -- if it's not too painful.

I think it would be good to keep both, because the html clean plugin performance will likely not be as good as the white list stuff that you added.

The reason I added span to the list was because there's a way to provide predefined classes and wrap content within a span with that class.. I didn't want to be stripping those out, but I'm not super attached to it.. I just think by default it should be a little more loose, but that's just me. I was probably just trying to make it more loose.

I can take them out if it bothers you.