HtmlAttributeEncode

The HtmlAttributeEncode() function encodes the given text in a form that can safely be used inside an HTML attribute.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text that can safely be used inside an Html attribute. Returns Invalid expression if the result is not a text.

Syntax

HtmlAttributeEncode(text)

HtmlAttributeEncode("\"Line 1\"\n'Line 2'") => "Line 1" 'Line 2'

HtmlAttributeEncode() => Invalid expression

Parameters

NameTypeRequiredDescription

text

text

☑️

a text to be used as an attribute in HTML tags

Last updated