diff --git a/tests/unit_tests/data/html_sanitisation_test_cases.md b/tests/unit_tests/data/html_sanitisation_test_cases.md index b8073405..e831b123 100644 --- a/tests/unit_tests/data/html_sanitisation_test_cases.md +++ b/tests/unit_tests/data/html_sanitisation_test_cases.md @@ -11,9 +11,7 @@ Anything not in code blocks is a comment. This file is run by /tests/unit_tests/test_ui.py ## Test scripts removed - The script is removed but the contents remain. - ### Input ```html @@ -24,8 +22,9 @@ The script is removed but the contents remain. alert("x") Hello ``` -## Test script in bold tag + +## Test script in bold tag ### Input ```html click me! @@ -35,6 +34,7 @@ Hello click me! ``` + ## Test script in disallowed tag ### Input ```html @@ -44,6 +44,7 @@ Hello ```html ``` + ## Test cookie grabber script is escaped The script should become escaped and have no tags ### Input @@ -57,6 +58,7 @@ var adr = '../evil.php?cakemonster=' + escape(document.cookie); var adr = '../evil.php?cakemonster=' + escape(document.cookie); ``` + ## Test with non-http links Remove the javascript from the links. ### Input @@ -74,6 +76,7 @@ Remove the javascript from the links. Relative ``` + ## Test http links become external Remove the javascript from the links. ### Input @@ -85,6 +88,7 @@ Remove the javascript from the links. OpenFlexure ``` + ## Test basic formatting preserved Check basic elements are not changed ### Input @@ -96,6 +100,7 @@ This is bold italic and on a new
line. This is bold italic and on a new
line. ``` + ## Test http link with path preserved Valid HTTP links should preserve their path. ### Input @@ -107,6 +112,7 @@ Valid HTTP links should preserve their path. Docs ``` + ## Test http link with fragment preserved Valid HTTP links should preserve their path and fragment. ### Input