• Closed by: Alex
  • Closed on: 22.07.15, 13:06
  • Reason: Closed
  • Comment: Glad to help!

Ticket #7970 - Custom tab with quote doesn't work

Hi,

When I fill out the form for custom tab in theme setting, if content contain quote, it doesn’t save or save empty field !

Thanks

Comments

Alex 30 Jun 2015, 21:21

Hi. Yes I see the issue. We need a few days to investigate and find the reason. I will write you back soon.

Marek 03 Jul 2015, 11:24

Hi. Yes, it has a limitation to use single quotes. Please use double quotes instead.

Christelle Simon 03 Jul 2015, 12:27

Hi,

It is not possible to use double quote instead simple quote or apostrophe.
It’s essentiel in french language and not possible to replace this character with another !
Also, in english to. For example : “he didn’t like school” or “my father’s name”

Thank you for an effective solution,

Alex 03 Jul 2015, 12:35

You can use as temp solution Standard ASCII http://www.ascii.cl/htmlcodes.htm for ' single quote use

'

I’ve checked and it works
http://c2n.me/3kdxZtn

Christelle Simon 06 Jul 2015, 11:54

Hi,

The html code for single quote works indeed. But we have an another problem : when we change the title “test” of this custom tab, it doesn’t save. We don’t know why, because there is no quote in that case !
Furthermore, impossible to save the layout coding of the page (strong code for exemple).

Can you find a solution ? Thank you for your answer.

Alex 06 Jul 2015, 21:05

Changed title without any problem http://c2n.me/3km336s
Or I didn’t understand something?

Christelle Simon 07 Jul 2015, 10:23

In fact, when I save once, the ASCII code for single quote disappears and if I don’t get it before saving again, I have the same problem as previously : The modifications are not saved. That’s why my title could’t be change… It’s the same for layout code as “strong”.
I have to get back the ASCII code each time I want to make modifications. Not very practical. Did you find a solution to fix that ?

Alex 07 Jul 2015, 10:38

For now I only can recommend you to use http://www.ascii.cl/htmlcodes.htm solution.
We will try to find a better solution for that and I write you back.

Marek 12 Jul 2015, 19:46

Hi.
Here is the solution:
open the file “modules/pk_themesettings/pk_themesettings.php” find the line:

$custom_tab = Tools::getValue('custom_tab_'.$language["id_lang"]);

and replace with:

$custom_tab = addslashes(Tools::getValue('custom_tab_'.$language["id_lang"]));

find the line:

$custom_tab[$language["id_lang"]] = $getData[0]["custom_tab"];

and replace with:

$custom_tab[$language["id_lang"]] = stripslashes($getData[0]["custom_tab"]);
Christelle Simon 22 Jul 2015, 11:16

It works !
Thank you !