Skip to content

Instantly share code, notes, and snippets.

View DanielJomphe's full-sized avatar

Daniel Jomphe DanielJomphe

View GitHub Profile
/**
* Applies a very default Google Caja HTML cajoling pipeline.
* <p/>
* There's three things we might not like about this naive, default implementation.
* <ol>
* <li>It rewrites URLs by prefixing them and suffixing them with stuff.</li>
* <li>It uses Google Caja's default whitelists. They accept all valid markup that's not deemed insecure. We might prefer to provide more restrictive whitelists.</li>
* <li>It will be slow in an app where there's many users concurrently using it. This is not the case for our first client's needs, so we don't care for now.</li>
* </ol>
*/