|
|
|
HTMLDecode User Defined Function in T-SQL 1.0
2/9/2006
|
|
Download (2 KB) |
Background
Storing HTML in databases requires, usually, HTML encoding. But using this from high level gives you access even to the HTML Decode function. This is not true if we have to deal with this kind of data directly at T-SQL level.
Usage
Use this as a normal UDF. If some HTML encoded text is passed in, it would be decoded
and returned.
For example:
SELECT dbo.HTMLDecode('This text contains "encoded" chars ©')
This is the output:
This text contains "encoded" chars ©
Implementation
This was coded as a quick hack using a lot of string operations to replace hard-coded strings and removing particular
patterns containing ASCII char values.
|
|
|
|
Get Skype and call me for free.
|
|