Problem with utf-8 characters
The output have some problem with the utf-8 characters.
How can i fix this?
Input: zorg & welzijn Output: zorg & amp; welzijn
Code: \Purifier::clean( \Input::get( 'name' ) );
return [ 'encoding' => 'UTF-8', 'finalize' => true, 'preload' => false, 'settings' => [ 'default' => [ 'HTML.Doctype' => 'HTML 4.01 Transitional', 'HTML.Allowed' => '' ], ], ];
Now i do: htmlspecialchars_decode(\Purifier::clean( \Input::get( 'name' ) ),ENT_NOQUOTES);
This issue is invalid. & is not a UTF-8 specific character, it's a special character in HTML and should be escaped. It appears that you want to convert HTML in to simple text; witch is not the purposes of this library. Even if it was you are filing the issue with the wrong package as this is just the glue between Laravel and the actual HTMLPurifier package.
For you solution you should use html_entity_decode() instead of htmlspecialchars_decode() and ENT_QUOTES instead of ENT_NOQUOTES.