Website Services

Show HTML entity characters in Joomla pages

Sometmes all the helpful tools like WYSIWIG content editors can stop you achieving something simple like getting certain HTML entity strings out to the browser. htmlentity_icon

I had this problem with the humble { character while documenting the MathPublisher plugin. I needed the user to see {mathpublisher} without this string being picked up by the plugin interpreter. Simple, I thought, just use the Ω (insert custom character) button in the editor and I can use the HTML entity string for {. But, the { character is not listed there. OK, just enter the { string myself. No, that gets converted to { and doesn't display as {. Right, enter it in the HTML code editor instead - yes this works, but only if I never return to the WYSIWYG editor, when it gets converted back to a simple { !

I checked the editor config settings and played with some of them to no avail. So, I decided to write this simple plugin. I'm sure there are other situations where it could be useful, but I can't think of any off the top of my head just now.

Anyway, if you need a way to force HTML entity strings into your page instead of using the characters they represent, so that other parts of Joomla do not interpret the characters in unhelpful ways, this is for you. Just use the string {htmlentity:code} to write &code; into your page when it is displayed.

Get the HtmlEntity plugin here.

We use cookies. By browsing our site you agree to our use of cookies.

I understand (removes this notice). Find out more