HtmlDecode
Decodes a string that may contain HTML numeric character references or HTML character entity references.
- Free Function
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
SELECT SQLHTTP.net.HtmlDecode ( @String )
Name | Type | Description |
---|---|---|
@String | nvarchar(MAX) | Any character string, variable, or expression. |
nvarchar(max)
See the following Wikipedia articles for a Character Entity References in HTML and Numeric Character Reference in HTML
Decoding a string containing HTML character entity references:
SELECT SQLHTTP.net.HtmlDecode(‘I can now encode & decode an HTML string using SQL Server’)
———————————————————————————————–
I can now encode & decode an HTML string using SQL Server
I can now encode & decode an HTML string using SQL Server
Decoding a string containing HTML numeric character references:
SELECT SQLHTTP.net.HtmlDecode(‘I can now encode & decode an HTML string using SQL Server’)
———————————————————————————————–
I can now encode & decode an HTML string using SQL Server
I can now encode & decode an HTML string using SQL Server