Function mt_dom::safe_html [−][src]
pub fn safe_html<S, NS, TAG, ATT, VAL>(s: S) -> Node<NS, TAG, ATT, VAL> where
S: ToString,
NS: PartialEq + Clone + Debug,
TAG: PartialEq + Clone + Debug,
ATT: PartialEq + Clone + Debug,
VAL: PartialEq + Clone + Debug,
Expand description
Create an html and instruct the DOM renderer and/or DOM patcher that the operation is safe.
Note: this operation doesn’t sanitize the html code. It is your responsibility as a programmer to sanitize the input here.
Example
use mt_dom::{Node,safe_html}; let html: Node<&'static str, &'static str, &'static str, &'static str> = safe_html("This contains safe html and it's solid   should work correctly");