Try   HackMD
  1. To embed JS code literally in <script>: Replace < to \x3C in sequences </ and <!--.
  2. To interpolate inside an HTML tag:
    • Replace & to &amp; first, and then
    • Replace < to &#x3c;.
    Same to interpolate text in <title>;
    Keyword: RCDATA state.
  3. To interpolate an attribute: additional " to &#x22; or ' to &#x27; depending on which type of quotation marks.

    avoid unquoted user input (harder to escape)!

Notions

  • Indispensible in any HTML framework, frontend- or backend-oriented
  • Hard to do correctly if you are not a web pwner

References