The HtmlAttributeEncode() function encodes the given text in a form that can safely be used inside an HTML attribute.
HtmlAttributeEncode()
text
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.
Invalid expression
HtmlAttributeEncode(
)
HtmlAttributeEncode("\"Line 1\"\n'Line 2'") => "Line 1" 'Line 2'
HtmlAttributeEncode("\"Line 1\"\n'Line 2'")
HtmlAttributeEncode() => Invalid expression
☑️
a text to be used as an attribute in HTML tags
Last updated 8 months ago
Was this helpful?