Converts the given HTML string to Markdown
Markdown
Checks whether the string is a valid email. If so, additional sanitizing is not needed.
Checks whether the string is in a float
(optional) min max lt gt
Checks whether the value is a valid ID. If so, additional sanitizing is not needed.
Checks whether the string is in an array of allowed values
Checks whether the string is in an integer
(optional) min max lt gt
Checks whether the string is no longer than the specified length. (Note: not checking this does not trigger crashes on the developer H2 database, instead strings are just truncated)
Checks whether the string is a valid slug. If so, additional sanitizing is not needed.
Checks whether the string is a valid URL. If so, additional sanitizing is not needed.
Checks whether the string is a valid username. If so, additional sanitizing is not needed.
Converts the given Markdown to XSS-safe HTML
Converts the given Markdown to single-line text
text without markup, but should not be trusted as safe HTML!
Converts a string built in a date time picker to an actual date which can be stored in a model
Tries to parse the given JSON. By default, returns false if parsing fails
throwError acceptInvalid
Sanitizes Markdown form input very lightly, just by limiting its length. Real sanitization needs to happen after converting it to HTML.
maxLength
Sanitizes a string form input (by removing any tags and slicing it to the max allowed size). Use this on all string input unless you need more advanced escaping (e.g. for URLs, for Markdown)
maxLength
Generated using TypeDoc
Turns a string into a slug suitable for URLs.