You are here:  » Ampersands - how to display correctly

Support Forum



Ampersands - how to display correctly

Submitted by redspan on Fri, 2008-03-28 19:49 in

Hello,

I think this has been answered before but I can't find the thread. Lots of feeds include names like "Dolce & Gabbana" and when imported this appears as "Dolce amp Gabanna"

How can I ensure that ampersands are either displayed as & or 'and' ?

Thanks,
Ben

Submitted by support on Fri, 2008-03-28 19:57

Hi Ben,

The best solution is to search for the entity before the standard filters are applied and replace it with "and". In includes/admin.php, search for the following comment (line 158 in the distribution):

/* apply standard filters */

..and insert the following code immediately BEFORE that line:

$record[$admin_importFeed["field_name"]] = str_replace("&"," and ",$record[$admin_importFeed["field_name"]]);

That should do the trick!

Cheers,
David.

Submitted by redspan on Fri, 2008-03-28 20:25

Works a treat!

Thanks David :)