FCF 2.0 development in progress...
> > > >
[News] [Packages API] [Downloads] [Donate to the project] [Contacts]

fcf.encodeHtml() function

string fcf.encodeHtml(string a_str)

Package: fcf-framework-core

File: fcf-framework-core:fcf.js

Available from version: 2.0.2

Encodes only structural special characters ( " ' > < &) in an HTML code construct

Arguments

string a_str
- Source string
Result
string
- Encoded HTML string

Example: Function application

{ let newString = fcf.encodeHtml(`< > & " '`); console.log(newString); }

Output:

&lt; &gt; &amp; &quot; &apos;