Skip Navigation

[Resolved] Custom fields html output

This support ticket is created 3 years, 9 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by xiaolinW 3 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#2055337

Do I have to escape values from custom fields when I get them with get_post_meta()?

#2055393

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Xiaolin,

Thank you for getting in touch.

Yes you will need to escape these values as I the get_post_meta() function doesn't do this automatically.

Thanks,
Shane

#2055803

thanks, but does toolset do some sort of protection or it just saves post meta as plain text?

#2058469

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Xiaolin,

Thank you for the continued patience.

The fields are stored as plain text in the database. However when they are retrieved using the Toolset functions there is some protection unless you want to output the raw value from the database.

Thanks,
Shane

#2061629

My issue is resolved now. Thank you!