Javascript validation errors in Sidebar

I obtained an author’s widget from: ezinearticles.com, bukisa.com, hubpages.com each.
They are all in Javascript.

When placed in Sidebars, the W3C validator raises a hundred errors. However, when placed in a Page, it works flawlessly.

Till date no one has given any reason why it happens. Whether anyone can help me out?
The widget code is like this:
<script type=“text/javascript” src=“http://ezinearticles.com/widget/inc/eawidget.js”></script><script type=“text/javascript” src=“http://ezinearticles.com/widget/widgetfetch.php?theme=100&cheader=bb2020&cborder=d0d0d0&cbackground=f1f1f1&ctopic=f1f1f1&ctopictext=000000&ch3=bb2020&cfooter=f1f1f1&cfootertext=000000&mem=805036&height=400&width=270&articles=10&authorid=My Name&bio=1”></script>
Thanks

Can you please provide us with a link to a test page on which the many errors occur?

Thanks for your reply. I am so happy some one responded. Here is the link:

[Invalid] Markup Validation of http://www.accidentinsuranceforfree.com/ - W3C Markup Validator

I have pasted the widget in the Sidebar where it produces 28 errors. Currently I have pasted ONLY from ezinearticles.com, and not from Bukisa & hubpages.

Thanks

Milind

I will copy here what the validator says for that first error.

Line 144, Column 293: cannot generate system identifier for general entity “cheader”
….com/widget/widgetfetch.php?theme=100&cheader=bb2020&cborder=d0d0d0&cbackgroun…

An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "[URL=“http://www.htmlhelp.com/tools/validator/problems.html#amp”]Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as “&” (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and æ are different characters.

If this error appears in some markup generated by PHP’s session handling code, this article has explanations and solutions to your problem.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.

The error message seems to be pretty clear about what the problem is, why it occurred, and what you can do to fix the problem.

Is there anything about it though that you want further information on?

Thank you Sir. It has worked.

I wonder since Sidebar is just an extension, the “&” rule is checked here and not on any “page”.

I have lost count on the number of forums I posted, NO ONE replied. You are a different class apart.

You may need to help us understand the difference between what you mean there. Can you come up with a couple of quick examples that help to demonstrate the difference between the two?

Sir

As I mentioned in my first post, the same code worked without any validation errors (On a Page). I wrote this to some known thesis theme tutorial websites, and even they were amused, “when it works on a Page, why not in Sidebar”?

I am a newbie, with just 4 months on Wordpress. I only have right to be amazed as well. I have neither any answers nor solutions.

Moreover, as I said no one from the countless forums I posted on, replied. Again I am amazed.

This is the first that you’ve mentioned that Wordpress is involved, so there’s your answer. When you put it in the wordpress page, instead of the sidebar, you should see that page source for that link has been properly converted for the page content. The good people in our wordpress forum really are the best to talk to though when it comes to Wordpress related issues.

Sir
What you say must be right (Though I did not understand, it went above my head)

When Wordpress forums kept quiet, I went to Thesis forums, then I looked for Javascript forums. If no reply resulted I would have asked sitepoint admin, where to go for it.

(The HTML rules [not all] are so stupid and confusing, I do not venture exploring more. The code was Javascript and I thought of posting right to that specific forum)

(The HTML rules [not all] are so stupid and confusing, I do not venture exploring more. The code was Javascript and I thought of posting right to that specific forum)

You thought the issue was Javascript, so you posted here. That’s fine.

What Paul means is, now that you know Wordpress is involved with your (lack of) errors, if you have further questions about how Wordpress deals with special characters like &'s or how it deals with Javascript, we also have a special forum section for that too :slight_smile:

To clear things up, it wasn’t javascript code at all that was involved. It was instead an HTML tag that requests script content. None of the script content was involved in the problem that you faced. The same problem would have occurred if it was an image tag, or a link tag.

The actual cause was due to how the URI in the HTML attribute was being parsed. Still, it’s good that you’re all sorted now.