atkayla
atkayla

Reputation: 8859

How to relax Google Caja HTML Sanitizer? It's sanitizing too much

I am using Google Caja HTML Sanitizer (https://code.google.com/p/google-caja/wiki/JsHtmlSanitizer), however it is sanitizing things I don't want it to.

Sometimes I want to input data in a format similar to:

Bob <Carpenter>

but this becomes:

Bob

Upvotes: 2

Views: 415

Answers (1)

user149341
user149341

Reputation:

Caja sanitizes HTML. <Carpenter> isn't valid HTML. Therefore, it gets sanitized.

If the data you're inputting isn't actually HTML, don't run it through Caja.

Upvotes: 3

Related Questions