encode

The encode service can be used to XSS protect strings by encoding special characters or/and url encode string.

Special character encode

echo $this->provider->encode('<strong>You value</strong>')->get();

Result: <strong>You value</strong>

Raw URL encode

echo $this->provider->encode('lorem ipsun dolor')->urlEncode()->get();

Last updated