You are here:  » How to use filter for special chars (like ® , accented characters)?


How to use filter for special chars (like ® , accented characters)?

Submitted by magnaromagna on Mon, 2021-01-04 09:00 in

Hi,
some products have particular chars like ® or accented characters (è, ò), and the final product url give error.

How can I set up filters in order to manage them? For example

® --> will be removed
è --> convert into "e"

etc.

Thank you in advance!

Submitted by support on Mon, 2021-01-04 09:10

Hi,

This can occur in some cases depending on how special characters are encoded by WordPress but normally just a urldecode() is required to fix. To do this, edit pto.php and look for the following code at line 500:

  $pto_q = (isset($pto_q)?pto_common_normalise($pto_q,":\.\/"):"");

...and REPLACE with:

  $pto_q = (isset($pto_q)?pto_common_normalise(urldecode($pto_q),":\.\/"):"");

And then the following code at line 506:

  $pto_product = (isset($pto_product)?pto_common_normalise($pto_product,":\."):"");

...and REPLACE with:

  $pto_product = (isset($pto_product)?pto_common_normalise(urldecode($pto_product),":\."):"");

Cheers,
David.
--
PriceTapestry.com