Skip to main content

unescape()

Decodes HTML entities in a string. This is the opposite of escape.

Usage

import { unescape } from 'string-factory';

unescape(string);

Prop types

proptyperequireddefault
stringStringyesnull

Examples

unescape("&lt;script&gt;alert&#x28;&#x27;hello&#x27;&#x29;&lt;&#x2F;script&gt;") // "<script>alert('hello')</script>"