Skip Navigation

[Resolved] Single and double quotes are being escaped with \ in the JS and CSS editor

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by Beda 6 years, 4 months ago.

Assisted by: Beda.

Author
Posts
#924506
Edit Post Form after save - inserted backslashes.png
Edit Post Form - clean.png

When editing a CRED/Post form's JS and CSS any " or ' characters are being automatically escaped with a \ each time the form is saved. So if I save multiple times it ends up with a bunch of \\\ characters at every quote mark. This only seems to be effecting the data entered in Toolset Forms form editor - Views' and Content Template JS and CSS editors are not effected.

I have attached 2 screenshots to show what happens - the Edit Post Form clean version and then the form after saving with all of those \ automatically inserted when I saved the form.

I have tested on 2 different servers with different setups and a newly created test form for each, both with the latest version Toolset Forms. Same behavior on both. Create a form, then edit it and save changes, any quote marks in JS or CSS editors will be escaped.

#924659

I confirm and escalate the problem

We are planning in rewamping the editors that we use there, specially in notifications, so to use fully native code mirrors.
We can take a look at this in the sam process or earlier.

#924870

Thank you Beda. Is there an estimated time to a fix? At the moment the issue is breaking key forms in the project and delaying their deployment. Is a patch going to be released or should I work around it and move the JS?
Thanks!

#924958

The thing is it's weekend and until Monday, there will be no developers available to work on this.
After, it'll be handled accordingly the priorities and workloads.

I will keep you in the loop here.
I have no solution for this just now.

#952161