diff --git a/README.md b/README.md index d5f19eb20..3752b6526 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,18 @@ Styles from the parent application can be passed to the web component in a few d } ``` +#### Instructions Sanitisation + +Instruction steps are rendered into the page with `innerHTML`, so every step is +sanitised with DOMPurify first (see `src/utils/sanitiseInstructions.js`). This +applies to steps passed in the `instructions` attribute and to steps loaded with +a project. Scripts, event handler attributes, `javascript:` and `data:` URLs and +stylesheets outside a scratchblocks SVG are removed. + +`', + "iframe srcdoc": + '', + "allowed origin iframe with srcdoc": + '', + object: '', + embed: '', + "meta refresh": + '', + base: '', + "link stylesheet": + '', + "style element": "", + "style import": "", + "external svg use": + '', + template: "", + noscript: + '