Description

Decodes an HTML encoded string.

Returns

Decoded HTML string.

Category

Display and formatting functions.

Function syntax

DecodeforHTML(String encodedinput)

See also

Canonicalize,EncodeForHTMLAttributeEncodeForJavaScriptEncodeForCSSEncodeForURL

History

ColdFusion 10: Added this function.

Parameters

Parameter

Description

inputString

Required. The encoded string to decode.

Example

<cfif isDefined("form.submit")> 
<b> 
Output:<cfoutput >#DecodeForHTML(form.encodedUserName)#</cfoutput> 
</b> 
<cfelse> 
<cfset form.username=""/> 
</cfif> 
<cfform> 
<cfinput name="encodedUserName" type="text" value="#form.encodedUserName#"> 
<cfinput name="submit" type="submit" value="Submit"> 
</cfform>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy