# HTML Sanitisation Test Cases This file is in markdown not python for readability. Each test is a level 2 heading. The input and expected values are level 3 headings. The HTML to test is in triple backtick code blocks. Anything not in code blocks is a comment. ## Test scripts removed The script is removed but the contents remain. ### Input ```html

Hello

``` ### Result ```html alert("x")

Hello

``` ## Test script in bold tag ### Input ```html click me! ``` ### Result ```html click me! ``` ## Test script in disallowed tag ### Input ```html ``` ### Result ```html ``` ## Test cookie grabber script is escaped The script should become escaped and have no tags ### Input ```html ``` ### Result ```html var adr = '../evil.php?cakemonster=' + escape(document.cookie); ``` ## Test with non-http links Remove the javascript from the links. ### Input ```html link encoded Email Relative ``` ### Result ```html link encoded Email Relative ``` ## Test http links become external Remove the javascript from the links. ### Input ```html OpenFlexure ``` ### Result ```html OpenFlexure ```