# trust(html) - [Description](#description) - [Signature](#signature) - [How it works](#how-it-works) - [Security considerations](#security-considerations) - [Scripts that do not run](#scripts-that-do-not-run) - [Avoid trusting HTML](#avoid-trusting-html) --- ### Description Turns an HTML string into unescaped HTML. **Do not use `m.trust` on unsanitized user input.** Always try to use an [alternative method](#avoid-trusting-html) first, before considering using `m.trust`. --- ### Signature `vnode = m.trust(html)` Argument | Type | Required | Description ----------- | -------------------- | -------- | --- `html` | `String` | Yes | A string containing HTML text **returns** | `Vnode` | | A trusted HTML [vnode](vnodes.md) that represents the input string [How to read signatures](signatures.md) --- ### How it works By default, Mithril escapes all values in order to prevent a class of security problems called [XSS injections](https://en.wikipedia.org/wiki/Cross-site_scripting). ```javascript var userContent = "" var view = m("div", userContent) m.render(document.body, view) // equivalent HTML //