© Gero Zahn, gero-at-gerozahn.de
While using Joomla! 1.5.x - have you ever seen this?
This stupid "&" in the window title and the tab where it should say just plain "&"?
Wouldn't you much more like it to look like this?
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).
My solution sounds quite radical - yet, it works absolutely fine (at least for me).
Joomla's flaw is: It somehow double-replaces "&" characters with "&", resulting in "&amp;" inside the <title>...</title> tag, rendering "&" as "&" 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;" with "&". To prevent side-effects, it does it in the <title>...</title> tag only, nowhere else.
Basically it's one very comprehensively wrapped PHP call:
$searchfor = "/(<title>.*)&amp;(.*<\/title>)/i";
$replaceby = "$1&$2";
$buffer = preg_replace( $searchfor, $replaceby, $buffer );
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.
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.