Skip to content

TypeScript API / @laikacms/server/oauth2 / escapeHtmlAttribute

Function: escapeHtmlAttribute() ​

ts
function escapeHtmlAttribute(text): string;

Escape a string for use in an HTML attribute. Same character set as escapeHtml (single implementation); kept as a named alias so call sites document which context they are escaping for.

Parameters ​

ParameterType
textstring

Returns ​

string

Released under the MIT License.