gzFixTitleAmp -
A Joomla! 1.5.x plugin to fix the &amp; ampersands in the <title> tag

© Gero Zahn, gero-at-gerozahn.de

While using Joomla! 1.5.x - have you ever seen this?

Wrong Ampersand in Joomla! 1.5.x

This stupid "&amp;" in the window title and the tab where it should say just plain "&"?

Wouldn't you much more like it to look like this?

Right Ampersand in Joomla! 1.5.x

I bravely assume everybody would. However, this stupid bug is still present in Joomla 1.5 up to 1.5.15. There's not much you can do about it. Currently I've read just one hair-raising workaround to modify your content's or menu item's title again and again and again whenever you edit it to trick Joomla!.

This shouldn't be the preferred solution - and it doesn't work too well with JoomlAtWork's SEF Patch (a/k/a SEO Patch).

The solution: A system plugin to search and replace the misformatted ampersands

My solution sounds quite radical - yet, it works absolutely fine (at least for me).

Joomla's flaw is: It somehow double-replaces "&" characters with "&amp;", resulting in "&amp;amp;" inside the <title>...</title> tag, rendering "&" as "&amp;" in the browser's window titles and tabs.

My solution is a nifty little plugin (formerly known as mambot). It hooks into the onAfterRender() event, ie. shortly before the rendered page is delivered to the browser. Then it simply replaces "&amp;amp;" with "&amp;". To prevent side-effects, it does it in the <title>...</title> tag only, nowhere else.

Basically it's one very comprehensively wrapped PHP call:

That's it ... (RIP MJ)

I really hope that this stupid bug is going to be fixed some day inside the Joomla! core - thus rendering this plugin approach of mine obsolete. But until then - feel free to download and install my plugin.

The download

Go, get it:

Remember: After installing the plugin, remember to activate it!


Disclaimer: All quoted product or company names are or might be trademarks or registered trademarks owned by the correspondent companies. These names are used here solely for documentation purposes.
Any information on this page is given "as is". Though it is copyrighted by Gero Zahn, gero-at-gerozahn.de, the author refuses to take any responsibility for the described functions or side-effects using his software in unchanged or changed form.