Skip to content

Instantly share code, notes, and snippets.

@shameerc
Created November 4, 2010 04:02
Show Gist options
  • Save shameerc/662115 to your computer and use it in GitHub Desktop.
Save shameerc/662115 to your computer and use it in GitHub Desktop.
Avoid double encoding special characters
//Use the fourth argument as false
echo htmlentities($foo, ENT_COMPAT, 'UTF-8',false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment