Browsers only support CDATA markers in XHTML, so you need to:
- Write XHTML.
- Serve it as
Content-Type: application/xhtml+xml
so the browser doesn't push it through an HTML parser anyway.
(I only tested the above on Chrome, you can see the results).
You'd be better off getting the browser to treat it as text instead of as HTML:
$(this).text( $(this).html() );