Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capturing encoded liquid tags #713

Open
sebastienros opened this issue Nov 7, 2024 · 0 comments
Open

Capturing encoded liquid tags #713

sebastienros opened this issue Nov 7, 2024 · 0 comments

Comments

@sebastienros
Copy link
Owner

How to capture some liquid tag and rendering in html? The following code doesn't render what is expected:

{% capture r %}
{% raw %}
{% assign cultures = Culture | supported_cultures %}
<ul>item</ul>
{% endraw %}
{% endcapture %}
{{ r | escape }}

=>

{% assign cultures = Culture | supported_cultures %}
&amp;lt;ul&amp;gt;item&amp;lt;/ul&amp;gt;

This is double-encoded.

Without | escape it is not encoded at all.

{% assign cultures = Culture | supported_cultures %}
<ul>item</ul>

What is the way to get

{% assign cultures = Culture | supported_cultures %}
&lt;ul&gt;item&lt;/ul&gt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant