Replies: 3 comments 6 replies
-
Are you using twig? Try |
Beta Was this translation helpful? Give feedback.
1 reply
-
The directive ExamplePHP
Html
|
Beta Was this translation helpful? Give feedback.
3 replies
-
just use the backtick to define the string instead. ` that one, then ' won't escape the string
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a situation where I am trying to have a string with apostrophe into the Title, which is dynamic.
How can I escape that, as it gives me error and won't load the slider.
So for example if in the title I have:
title: ' I'm Lemon ';
How can I escape this so it will work?
x-data="carouselData([
{% for block in section.blocks %}
{ id: {{ forloop.index }},
url_pc: '{{ block.settings.theme_slider_img | img_url: '1500x' }}',
title: '{{ block.settings.theme_slider_title | escape }}',
desc: '{{ block.settings.theme_slider_desc | escape }}',
button_style: {% if block.settings.theme_button_slide %} 'button--secondary' {% else %} 'button--primary' {% endif %},
button_link: '{{ block.settings.theme_slide_btn_link }}'},
{% endfor %} ])" x-init="initHandleSwipe()">
Beta Was this translation helpful? Give feedback.
All reactions