-
AuthorPosts
-
November 2, 2020 at 9:44 pm #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.
November 4, 2020 at 4:03 pm #1258314Hey,
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,
YigitNovember 4, 2020 at 9:26 pm #1258439Thank 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?
November 5, 2020 at 2:20 pm #1258608Hey,
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,
YigitNovember 5, 2020 at 8:53 pm #1258727But 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!
November 6, 2020 at 12:37 pm #1258842Hi,
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,
YigitNovember 6, 2020 at 5:31 pm #1258923It 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.
November 9, 2020 at 4:10 pm #1259282Hi,
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,
YigitNovember 9, 2020 at 7:20 pm #1259350The XSS Auditor refused to execute a script in ‘https://site.com/wp-admin/post.php?post=2&action=edit&message=1’ 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: QTagsThanks.
November 11, 2020 at 1:43 pm #1259880 -
AuthorPosts
- You must be logged in to reply to this topic.