Spec-Zone.ru › ColdFusion

htmlEditFormat

Replaces special characters in a string with their HTML-escaped equivalents.

htmlEditFormat( string [, version] ) → returns string

The htmlEditFormat function was REMOVED from ColdFusion 2025 and has been DEPRECATED since ColdFusion 11

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: encodeForHTML

    Argument Reference

    string string
    Required

    A string or a variable that contains one.

    version numeric
    Default: 2.0

    HTML version to use; currently ignored.
    Values:
    • -1
    • 2
    • 3.2

    Compatibility

    ColdFusion:

    DEPRECATED since version 11 REMOVED in version 2025 Use encodeForHTML, which can provide more protection from XSS.

    Examples
    Sample code invoking the htmlEditFormat function

    Escapes the HTML characters

    htmlEditFormat( "This is a test & this is another <This text is in angle brackets> Previous line was blank!!!" )

    Expected Result: This is a test &amp; this is another &lt;This text is in angle brackets&gt; Previous line was blank!!!

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/htmleditformat

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API