Hello,
Some of the merchant and product names, and descriptions contain ampersands, apostrophes etc and these can't be displayed or display wrongly. For example:
Merchant name C'Est Noir can't be listed during the registration as C'Est Noir because the apostrophe is treated as an illegal character (as is a dash too).
Brand name "Dolce & Gabanna" ends up being listed as "Dolce amp Gabanna"
etc.
Is there a way of ensuring that these characters are displayed exactly as they should?
Regards,
Ben
Hello Ben,
I'm afraid incorporating those characters into merchant and product names is very risky because of the effect on the URL. However, if you wish to enable HTML entities in certain fields (which is why you are getting "amp" instead of & you need to permit the & and semi-colon characters during import - but having done this you need to make sure that you URLs and links still work as expected.
To permit these characters, look for the /* apply standard filters */ section in includes/admin.php, at around line 158. Here you will see calls to the tapestry_normalise() function for each of the fields. For example, the brand field is normalised by the following line (177 in the distribution):
$record[$admin_importFeed["field_brand"]] = tapestry_normalise($record[$admin_importFeed["field_brand"]]);
To permit HTML entities, change this as follows:
$record[$admin_importFeed["field_brand"]] = tapestry_normalise($record[$admin_importFeed["field_brand"]],"&;");
The list of characters in the second parameter to tapestry_normalise() is a list of characters allowed in the field in addition to the usually allowed characters. This means that an HTML entity such as & will be displayed correctly as &.
Hope this helps,
Cheers,
David.