Last Updated: February 25, 2016
·
612
· dannycastillo

Shady characters

Sometimes random characters are encoded into your text blocks on a browser to browser or computer to computer basis. "Gremlins" are usually caused because whichever program is putting the quotes in is using the actual pretty / curly / smart quotes instead of the proper HTML entities Little "gremlins" have been appearing in my work with WordPress themes.

Isolating these specific areas of text and sweeping them clean of to plain text would not be the ideal solution. Setting up a preprocessor of the text to convert them to HTML entities.

resource: http://php.net/manual/en/function.htmlentities.php
resource: http://alistapart.com/article/emen

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside