Follow

I have an issue with my site where it won't let me render any curly brackets. For example, in liquid syntax:

{{ page.title }}

I've tried using the HTML encode equivalent in the code block, but even that doesn't work.

They render fine in Gutenberg, but are just blank in the front end. Any of the WordPress experts out there (like @chris) know what's going on here and how I can get around it please?

@kev Not a WordPress expert, but some programs may un-escape HTML themselves before processing data iirc. Maybe try double-escaping that sequence?

@kev I’d love to give you a direct answer but there are so many possibilities. The most likely culprit is a plugin that is trying to parse something with regex looking for that format. It might (and I mean might) be solvable with a search for the appropriate regex in the plugins folder.

@chris hey Chris, thanks for coming back to me - I had a similar thought, and have been troubleshooting with my plugins on my staging site. I've narrowed it down to a problematic plugin.

Sorry, meant to update this post. Thanks for the reply.

@kev

My guess would be that you may be using a theme that uses Timber.

https://wordpress.org/plugins/timber-library/

Timber uses the Twig templating library, which uses that same mustache syntax.

I’ve recently seen and worked with a bunch of new WordPress themes using Timber.

@chris

@danjones000 nope. Wasn't that. It was a plugin that I was using that had reserved {{ and }} globally. I got in touch with the devs and they fixed it.

@chris

@kev @chris Did you do a view source to see if anything was there? I'd try disabling your plugins one at a time, and then check the WP codex, but the HTML encoding for { should work, that's weird. Maybe your font doesn't support curly braces?

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.