15 July 2009

Outsmarting smart editor

This post is a reminder for future reference.

I've been struggling to get the link to save correctly in our new CMS at MPOW so that the Add to Google works for the library catalogue search gadget. On saving, the clever cms would strip out the beginning of the href and just link to the xml file instead of referring the iGoogle service to the xml file.

Google provides a form to create the html to embed in the web page.
The resulting code looks something like this:

The CMS saved it like this...
The user just ended up viewing the xml file instead of being able to add it to iGoogle.

To fix this I replaced all the "/" with "#47;" after the second occurrence of "http". The result is that the link saved correctly although replaced the "#47;" with "/" in the code. This means anytime we update the page we will have to redo this section.

Anyhow - Google gadget can now be added from this page.