@serenity-is/corelib / attrEncode

Variable: attrEncode()

const attrEncode: (s) => string = htmlEncode

Defined in: src/compat/html-compat.ts:22

Html encodes a string (encodes single and double quotes, & (ampersand), > and < characters)

Parameters

s

any

String (or number etc.) to be HTML encoded

Returns

string

Deprecated

use htmlEncode as it also encodes quotes