The W3C validator shows a "cannot generate system identifier for general entity" error when attempting to validate a page that contains the following code:

<script type="text/javascript" src="http://view.light-speed.com/teamspeak3.php?IP="></script>

How do I get the validator to ignore this code when testing for errors?

  • Just a point... On your page, you have missed the first line of your script from the CDATA section.
    – MrWhite
    Aug 21, 2012 at 16:13
  • Hi Jon, and welcome to Pro Webmasters! Thanks for your question. I've edited it to simplify it a little, and I've also provided an answer below that should help. (When asking a question, it's best to write it in a way that will help future visitors who have the same problem. i.e. by explaining the problem in its simplest form, without specific links to your own site if you can avoid them.) Hope that helps!
    – Nick
    Aug 21, 2012 at 16:18

1 Answer 1


The W3C's validator tool offers cryptic error messages, but it actually gives you the answer to solve this. It complains about the line you've highlighted with the message:

"The most common cause of this error is unencoded ampersands in URLs"

This means you need to encode the ampersands in any scripts you include by using &amp; instead of &. So instead of this:

<script type="text/javascript" src="http://view.light-speed.com/teamspeak3.php?IP="></script>

You need to use this (scroll to the right to see that the & have been replaced with&amp;):

<script type="text/javascript" src="http://view.light-speed.com/teamspeak3.php?IP=;PORT=27617&amp;QUERY=20274&amp;UID=506987&amp;display=none&amp;font=12px&amp;background=transparent&amp;server_info_background=transparent&amp;server_info_text=%23640d04&amp;server_name_background=transparent&amp;server_name_text=%23640d04&amp;info_background=transparent&amp;channel_background=transparent&amp;channel_text=%23640d04&amp;username_background=transparent&amp;username_text=%23640d04"></script>

Replacing that line will solve many of your errors. You can read more about the reason this is necessary in the common errors page that W3 links to from their validator.

  • Thank you very much for the excellent help. After pasting that code in I get 0 errors from w3c. Im not actually too good with javascript, can get by editing certain things but not much. However what you said actually seems pretty straightforward. Ill know how to deal with this in the future. Aug 21, 2012 at 16:50
  • @JonEdwards You're welcome! (And if the answer solved your problem, you can mark it as accepted by clicking the check mark that appears underneath the arrows to the left of this answer. More info here.)
    – Nick
    Aug 21, 2012 at 16:53
  • I also fixed the cdata part at the top. Id pasted it in one line too late. Thanks for noticing now fixed. Aug 21, 2012 at 16:54

Your Answer

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

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