Java REGEX `. – Mike Samuel Nov 23 '11 at 18:57

  • @mikesamuel - it will then convert `` to `` will it not? – Code Jockey Nov 23 '11 at 22:54
  • @CodeJockey, If the replacement was done in a loop that looped until convergence, yes, but I don't see anything in your answer about doing the replacement in a loop. A single global replacement is insufficient. – Mike Samuel Nov 24 '11 at 19:43
  • 0

    OWASP Java HTML Sanitizer is an HTML sanitizer sponsored by OWASP written in Java that takes a string of HTML and whitelists tags and attributes to produce a string of safe HTML.

    It's gone through multiple rounds of attack review and fits the same niche as AntiSAMY.

    Full disclosure: I am a maintainer.

    Mike Samuel
    • 118,113
    • 30
    • 216
    • 245