You are here:  » Replace slash and apostrophe in the name

Support Forum



Replace slash and apostrophe in the name

Submitted by DVDAFFAIRES on Tue, 2013-03-12 17:17 in

Hello David,

In version 13/03A, how little I replace apostrophes ['] and slashes [/] in the name of the product?

For example a title: D'enfer -> url: Denfer.html
I'd rather replace them with a dash [-] rather than delete it.

Thank you in advance.

Cheers,
Raoul

Submitted by support on Tue, 2013-03-12 17:35

Hello Raoul,

Characters that are stripped for the URL version of product names are removed by this code at line 27 of includes/tapestry.php:

$text = preg_replace('/[^A-Za-z0-9'.$allow.' ]/e','',$text);

...so for treatment as a space instead (which will be replaced with "-" in the URL), REPLACE the above line with:

$text = preg_replace('/[^A-Za-z0-9'.$allow.' ]/e',' ',$text);

Cheers,
David.
--
PriceTapestry.com

Submitted by DVDAFFAIRES on Tue, 2013-03-12 18:27

In includes/tapestry.php ?

I can not find it in the admin.php file

Cheers,
Raoul

Submitted by support on Tue, 2013-03-12 20:35

Hi Raoul,

Ah sorry yes - includes/tapestry.php - corrected above...

Cheers,
David.
--
PriceTapestry.com