Home › Forums › Backend Issues (wp-admin) › layout_title gets escaped by JS after being rendered › Reply To: layout_title gets escaped by JS after being rendered
after trying a few things it looks like the solution is to return stripslashes($title);
any attempts to encode or decode html get cancelled out by the fact that the next time the ajax_layout_title loop runs JS will sanitize it.
stripping right before returning let’s jQuery do whatever it wants with the string, cleaning up just before it is shown to the user.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.