You are here:  » html in desc.

Support Forum



html in desc.

Submitted by wilkins on Tue, 2006-07-18 20:00 in

hi

I want to keep the html in the desc. field, i read the forum reply about taking the strip command out of includes/admin.php. Did this put its still stripping the html, tried it with a xml and csv feed, do i need to do anything else.

Thanks

Brent

Submitted by support on Tue, 2006-07-18 20:23

Hi Brent,

The normalise function also strips HTML characters, so this line will need to be removed aswell. The easiest thing to do is to comment out the entire block from line 159 thru 164:

<?php
    
/*
    if ($admin_importFeed["field_description"])
    {
      $record[$admin_importFeed["field_description"]] = strip_tags($record[$admin_importFeed["field_description"]]);
      $record[$admin_importFeed["field_description"]] = tapestry_normalise($record[$admin_importFeed["field_description"]],",'\'\.%!");
    }
    */
?>

Cheers,
David.

Submitted by bwhelan1 on Mon, 2007-03-26 17:40

David,

A given feed has a product titled "1080º Avalanche (GameCube™)" where
it gets normalised to be "1080� Avalanche GameCube" but I get PHP errors when trying to click through to that product from the Merchant page. I assumed it was because of the "º" character and tried a find and replace filter but it did not work. Any ideas?

Bill Whelan

Computer Store

Submitted by support on Tue, 2007-03-27 02:23

Hi Bill,

That sounds like a character set issue as � is displayed by some browsers when the character codes do not conform to the character set indicated in the HTTP headers (which in Price Tapestry are set by the $config_charset parameter in config.php).

If you are currently using UTF-8, I would recommend changing to ISO-8859-1 as the second most common character set. If this is not an option; you could also try a UTF8 Encode filter against the product name field...

Cheers,
David.

Submitted by bwhelan1 on Thu, 2007-03-29 19:54

David,

I changed the encoding as instructed and the products table got corrupted after importing a feed. I was able to recreate the table with the string in setup.sql. Is it important to have the proper encoding setup in config.php before the database is created or can I just select the proper encoding from PHP MyAdmin after the fact?

Bill Whelan

Computer Store

Submitted by support on Fri, 2007-03-30 19:48

Hi Bill,

The encoding shouldn't have any effect on the database as it should quite happily store the character stream regardless of character set. Table corruption does occasionally happen (with any database server) and is unlikely to be related to having changed the character set.

Cheers,
David.