You are here:  » Problem Characters

Support Forum



Problem Characters

Submitted by Arya on Sun, 2009-08-02 16:56 in

Hi,

I have implemented the following changes to deal with problem characters: -

In includes/admin.php

$record[$admin_importFeed["field_name"]] = tapestry_normalise($record[$admin_importFeed["field_name"]],"&#;");

and

$record[$admin_importFeed["field_description"]] = tapestry_normalise($record[$admin_importFeed["field_description"]],"&#;,'\'\.()%!");

In products.php

$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],"&#;:\."):"");

These changes have solved the vast majority of the issues. However, there are still a couple of problems: -

• The word "null" is inserted at the start of the some of the product description fields
• The " character displays as "e; in some cases

Both of these problems can be seen on this page: -

{link saved}

If there are any amendments that can be made to resolve these problems I would really appreciate someone letting me know.

Thank you,

Arya.

Submitted by support on Mon, 2009-08-03 09:08

Hello Arya,

From viewing the source, it looks as if both are down to litteral values contained in the description field of the feed you are using, and would be best handled using filters rather than code modifications.

Simply add 2 "Search and Replace" filters to this feed - the first to search for "null" (without the quotes) and replace with nothing; and the second to serach for ""e;" and replace with """ (which is the correct entity for a quote!)

Finally, add a Trim filter to remove any leading space that may surround the null text.

Cheers,
David.

Submitted by Arya on Mon, 2009-08-03 13:37

Hi,

I have added the filter and they work perfectly.

The only remaining problem is that we seem to have too many quote marks in places...

for example, in {link saved}

I was wondering if this was caused by the changes made to includes/admin.php and products.php (as shown above). Are these changes correct or should they be reverted?

Thanks very much for your help. I appreciate it.

Arya.

Submitted by support on Mon, 2009-08-03 13:51

Hello Arya,

I think that would require another Search & Replace filter; but just to be sure I'd like to verify what is actually in the raw data; and there is still an issue with product names containing the " character as they are not working on your server as it stands (try clicking one of the product names with too many quotes for example).

Could you please email me the name of the feed containing that particular product (the one with multiple quotes) and the following files (as attachments) and I'll check it out...

search.php
products.php
includes/admin.php

Cheers,
David.