Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1257707

    I followed this: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#using-special-characters

    The result is this:
    ###lt### /script###gt###

    Instead of loading the script, it shows as text.

    What to do ?

    Thanks.

    #1258314

    Hey,

    Thanks for contacting us!

    I tested it and it works fine on my end. Please see my screenshots – https://imgur.com/a/JBsWuC8

    Would you like to insert HTML code and display it as is just like following?

    <script>
    Something goes here
    </script>

    If so, you can use Code Block element and choose to “Escape HTML Code” in Advanced > Code Block Behaviour.

    If not, could you please let us know the steps you took?

    Best regards,
    Yigit

    #1258439

    Thank you.

    None of the above.

    You added a heading example with a script tag. Who will use that ever in life?

    I need to add a Jot form in a page, nothing else. That gives us something like this:

    <script type="text/javascript" src="https://form.jotform.com/jsform/111111111111"></script>

    Adding that in a code block shows this message: “Warning: Characters <,>,[,] might break ALB backend or frontend. Read more if you want to use them.”

    That read more takes you to the link I added in the first message. And that does not work as I said in the first message.

    So.

    How to add a script without breaking everything?

    #1258608

    Hey,

    I asked the same question myself! :)
    That is actually the intended use of the plugin, to add characters that normally break ALB. Some users like to add button titles with characters such as “Read more >” and that breaks ALB.

    Since you would like to add a Script tag, you actually do not need to worry about breaking it. You can add it into Code Block element as following
    <script type="text/javascript" src="https://form.jotform.com/jsform/111111111111"></script>

    I see this message is confusing in Code Block element so I will ask our devs if we can remove it from Code Block element :)

    Regards,
    Yigit

    #1258727

    But it actually breaks. After saving, the builder keeps loading forever. You have to manually go to the address bar and hit enter to refresh and load.

    Is there a way to avoid that?

    Thank you!

    #1258842

    Hi,

    I tested it on my local and live installation but after inserting the script and updating the page simply updates it as intended.

    Does the same thing happen when you insert the script in Text tab of Text Block element?

    If you do not mind sharing temporary admin logins we would gladly into it :)

    Best regards,
    Yigit

    #1258923

    It saves and update the page, but the builder does not load after saving. You have to refresh manually so it loads.

    You have to try with an actual real script for this to happen.

    #1259282

    Hi,

    I tried with actual JS function inside Script tags and it still works as expected on my end.
    Are you getting any errors or warnings in console?

    Best regards,
    Yigit

    #1259350

    The XSS Auditor refused to execute a script in ‘https://site.com/wp-admin/post.php?post=2&action=edit&message=1&#8217; because its source code was found within the request. The auditor was enabled because the server did not send an ‘X-XSS-Protection’ header.

    ReferenceError: Can’t find variable: wp
    ReferenceError: Can’t find variable: tinymce
    ReferenceError: Can’t find variable: QTags

    Thanks.

    #1259880

    Hi,

    Have you tried de-activating plugins and checked if that helps?
    If it does not, could you please share your script with us using pastebin.com?

    Best regards,
    Yigit

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.