Custom code problem error : Named entity expected. Got none

I’m trying to paste a code before the end of the body tag (as instructed from the source) but its giving me an error:

“Line 0 column 11: Named entity expected. Got none.”

this is the code im trying to put in:

<script src=""></script>

PS Im no programmer any help is appreciated tnx…

Hi @baki97, can you try this instead of your original script link:

<script language="JavaScript">
document.writeln("<script src=\"\"></script>");

Try that, and let us know if you run into any issues.

Cheers, Dave

1 Like

Let’s start with the fact that this code won’t work at all. Check its source. @baki97 where did you get it from?

Hi, just so we are clear on something :smile: The error he received, was about entering the code in the custom code section. The error can be solved by using the snippet I sent.

Now, that actual script may not work, but that is a separate issue.

Cheers, Dave


@cyberdave - the snipplet you have above works perfectly, thank you very much.

btw the original embed code is from socialshare monkey, which I was having trouble puting into my webflow sites. apparently it only generates that single line of code to embed.

1 Like

Thanks @baki97 for your update. Yep, most of the time, custom code will work fine in Webflow, but sometimes, it just have to be entered a certain way into the designer in the embed, or in the custom code section in the footer. It really depends what the script is, but if it is working for you, then that is great. I usually take the two topics of how to implement the code, and whether the code functions as advertised as two separate items :slight_smile: Cheers, Dave

After much gnashing of teeth wondering why my custom map wouldnt work, this worked for me…however. It ONLY works on the published version of the website straight from Webflow. If you export the code and upload to your own server, you will need to remove the document.writein part of the script.

Just thought I’d mention this incase anyone else runs across the same problem :smile:

Massive thanks to CyberDave for the original post!!

1 Like