Archived topic
Adding Javascript code
22 replies · Started by Marga on January 18, 2019
No problem :)
Hey Ying, the issue is that the script has added "escape characters" (extra quotes). The script I added to the hook is:
<script type=”text/javascript” src=”https://fareharbor.com/embeds/api/v1/?autolightframe=yes“></script>
However, on the site, it shows up with extra quotes:
<script type="”text/javascript”" src="”https://fareharbor.com/embeds/api/v1/?autolightframe=yes“"></script>
How do I fix that?
Can anyone tell me how to fix this?
GP doesn't interfere with any code added to the hook element, so make sure the code you entered is correct.
Try copy and paste this code:
<script type="text/javascript" src="https://fareharbor.com/embeds/api/v1/?autolightframe=yes"></script>
Something is interfering with the code. Like I said, the script I entered is: <script type=”text/javascript” src=”https://fareharbor.com/embeds/api/v1/?autolightframe=yes“></script>
But the script that shows on my site is: <script type=””text/javascript”” src=””https://fareharbor.com/embeds/api/v1/?autolightframe=yes“”></script>
So, no idea what's causing the extra quotes"" or how to fix it?
Hi Jason,
Can you double check if the quotation marks are straight and not slanted? Slanted quotation marks can cause issue.
If the quotation marks are straight, try temporarily disabling caching/optimization plugins.
Fernando, brilliant! That worked. I didn't know the quotation marks could be different. Thank you all for your help. Always appreciated!
You’re welcome Jason!