Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Marsel Nikolli 1 year, 3 months ago.

Assisted by: Marsel Nikolli.

Author Posts
October 3, 2023 at 9:36 pm #14508749

ericH-40

When I tried to manually change the taxonomy tag labels and slugs from English to French.

E.g.: Tag to Étiqueter - After clicking the save the French translation is encoded with some extra characters to Étiqueter. I think this may be due to the tick available on the French (Étiqueter) word. I searched some WPML documents to override but couldn't find anything related to it.

Any ideas?

Screenshot 2023-10-04 at 3.05.35 AM.png
October 4, 2023 at 11:52 am #14512613

Marsel Nikolli

Hi,

Thank you for contacting WPML Support.

Our dev team has identified that the problem is in our method WPML_Super_Globals_Validation::get_value, in wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-super-globals-validation.php.

We have a workaround solution for your website so that the issue is solved.
Please follow these steps:

1- Get access to your website files
2- Go to \WPML_Super_Globals_Validation::get_value in wp-content/plugins/sitepress-multilingual-cms/classes/request-handling/class-wpml-super-globals-validation.php
3- change the following code:


} else {
                $value = filter_var( $var[ $key ], $filter );
            }

to

} else {
 
 
                $value = filter_var( $var[ $key ], FILTER_SANITIZE_STRING  );
            }

Note: Before doing these changes please be sure to make a full backup(files & database) of your website in order to avoid any data loss.

Let me know if this works out or if you need any further help.

Looking forward to your reply,
Marsel

October 5, 2023 at 6:40 pm #14522741

ericH-40

Thank you Marsel!!

Since FILTER_SANITIZE_STRING is deprecated on the PHP 8.1.0. So I have used htmlspecialchars() instead of that and it's worked.

$value = htmlspecialchars($var[ $key ]);

Will the edit will resolve in a future version of sitepress-multilingual-cms?

Screenshot 2023-10-06 at 12.10.11 AM.png
October 6, 2023 at 7:08 am #14524557

Marsel Nikolli

Hi,

I am happy to see your issue is fixed and thank you for sharing your solution with us, anyway as an issue it was escalated to the development team and it should be fixed in the future but for now, I cannot give you an exact time when the next update will be.

Thank you and I wish you a great day,
Marsel