Namespace: html

qui.utils.html

Methods

(static) escape(s) → {String}

Escape HTML content, using HTML entities.

Parameters:
Name Type Description
s String
Source:
Returns:
Type
String

(static) formatPercent(text, wrapElement, values) → {jQuery}

Replace percent-formatted placeholders in a string with given values. Compared to qui.utils.string.formatPercent, this function works with jQuery elements instead of primitive values.

Parameters:
Name Type Description
text String

the text template with placeholders given as "%(name)s"

wrapElement String

the HTML element type to use to wrap the result (e.g. "span")

values Object.<String, jQuery>

the values used to replace the placeholders

Source:
Returns:
Type
jQuery

(static) plainText(s) → {String}

Remove any HTML tags from a string, keeping only plain text.

Parameters:
Name Type Description
s String
Source:
Returns:
Type
String