0

I created a frontend template page, my page has embedded some javascript. For some lines, I need to use the double curly brace.

one of the line

       <a class='media' data-media-index='{{> Index }}'>
        <img data-original="{{> Media.Images.LowResolution.Url }}"
             alt="{{> Title }}"
             style="display:inline-block;"
             class="lazy">
    </a>

but it turns out the page source is showing

        <a class='media' data-media-index='&#123;&#123;> Index }}'>
        <img data-original="&#123;&#123;> Media.Images.LowResolution.Url }}"
             alt="&#123;&#123;> Title }}"
             style="display:inline-block;"
             class="lazy">
    </a>

How can I get this fix and show double curly brace correctly?

2 Answers 2

0

Try adding \ before to say not to interpret it as code.

0

add delimiters in jquery will work change {{,}} to [[,]]

delimiters: ['[[', ']]'],

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.