Skip Navigation

[Resolved] Escaped character entities do not get rendered when the default value of a field

This support ticket is created 5 years, 11 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 10 replies, has 2 voices.

Last updated by Beda 5 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#1196433
Screen Shot 2019-02-05 at 10.15.34 PM.png

I am trying to:
I made a WYSIWYG field and when I type " into the default value box, the code actually renders on the screen. It does not behave like another field -- single line -- which escapes the character entity correctly.

Link to a page where the issue can be seen:

I expected to see:
"Lorem Ipsum"

Instead, I got:
"Lorem Ipsum"

#1196438

Beda has been helping me through social media channels. Please assign the ticket to him.

#1197072

Sorry, this took so long, but I do not want to bother you with the why (due to the request to assign this to me, the supporter ignored the hint I left and assigned it to me - with a hefty time difference of half the world, here we are.)

1. I cannot replicate it.

I tested adding default values with apostrophes to the WYSIWYG Field and that shows fine everywhere on the backend.

2. However today looking closer, I see you mean a Toolset Form, where the WYSIWYG is used.
There, I can confirm there is over-escaping (not encoding, but over-escaping). I am not sure why on your end it manifests as encoded, however, it should be the same core issue, which our technical debug will show.

Example:

This is "apostrophe"

becomes

This is \"apostrophe\"

(In my tests)

I reported the problem and will update you here with news.

#1197445

I see those marks (/) when I try to include HTML in placeholders for instance which isn't supported. hidden link

This indicates you may see them in new lines.

--Sam

#1197454

I ran another round of tests.

If I go to Toolset-->Custom Fields and type in """ it doesn't render the character entity in a WYSIWIG cred field, it prints the code """ to the screen like you see in my screenshot.

If I manually type the " mark, I see the over-escaping like you do.

--Sam

#1197455

I ran another round of tests.

If I go to Toolset-->Custom Fields and type in

"

it doesn't render the character entity in a WYSIWIG cred field, it prints the code

quot;

to the screen like you see in my screenshot.

If I manually type the " mark, I see the over-escaping like you do.

--Sam

#1197667

If I use " then I see the properly written " quote, not the un-decoded HTML entity.

Both in the visual and text mode of the WYSIWYG both on Post Forms and Post edit screens.

I can, however, produce the over-escaping, and we escalated this.

Can you send me a duplicate of the site (without any third party plugins or theme, if possible) so I can check this exception?

#1197975

you are misunderstanding what I'm seeing. If I type in the character entity -- the code --

"

Toolset does not render the "

#1199086

I think I got now what you mean - if you use """ you will see " (if you first load the text mode of the WYSIWYG, not in the visual mode, where it converts)

This is the exact same in a Toolset Form, for me.

1. If you save " in the Types field settings, you see over-escaped " in a Form's Visual AND Text Mode, but correct in a post edit screen
2. If you save "& quot;" then you will see the encoded value in post edit screen backend (text mode) only the first time loaded and after, the " (correctly parsed). In a Toolset form, that is the same, in Text mode, you see the code, in Visual the quote, and also this happens only the first time you load the form in text mode, not if you switch afterwards.

I added this note to the internal ticket.

#1239006

This will be fixed in the upcoming Types 3.3 release which is due within next week (not a promise, it's an estimation)

I'll update you when it's released.

#1240827

Types 3.3 is now released and will fix this problem.

Thank you for your continued patience, and if you stumble over any issue please do not hesitate to open a new ticket.