Is Blogspot serving invalid XHTML?
November 5, 2005 11:14 AM Subscribe
Blogspot automagically codes line breaks in XHTML form, so I'm trying to get my site to validate as XHTML 1.0. Parts of it fail to validate, but they're all parts that expand from strings in the Blogger template. What am I doing wrong? How do I get these parts to validate?
Going to the validation results for my page you can see that the same errors present themselves over and over:
there is no attribute "location.href".
an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
NET-enabling start-tag not immediately followed by null end-tag.
end tag for element "a" which is not open.
These all expand from this part of the template:
<MainOrArchivePage><BlogItemCommentsEnabled><a href="<$BlogItemCommentCreate$>" <$BlogItemCommentFormOnclick$>><$BlogItemCommentCount$> comments</a></BlogItemCommentsEnabled> |
which is, in turn, the part that puts the number of comments between the permalink and the linkbacks on each entry.
Is there anything I can do to get this part to expand to something that's valid XHTML?
I'm not finding any solutions in my searches, though I'm quite likely using all the wrong terms. And I've written Blogger support, but I've written them before and I know how that goes: you might as well write it out, roll up the paper, tuck it into a bottle, and toss it into the sea.
Going to the validation results for my page you can see that the same errors present themselves over and over:
there is no attribute "location.href".
an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
NET-enabling start-tag not immediately followed by null end-tag.
end tag for element "a" which is not open.
These all expand from this part of the template:
<MainOrArchivePage><BlogItemCommentsEnabled><a href="<$BlogItemCommentCreate$>" <$BlogItemCommentFormOnclick$>><$BlogItemCommentCount$> comments</a></BlogItemCommentsEnabled> |
which is, in turn, the part that puts the number of comments between the permalink and the linkbacks on each entry.
Is there anything I can do to get this part to expand to something that's valid XHTML?
I'm not finding any solutions in my searches, though I'm quite likely using all the wrong terms. And I've written Blogger support, but I've written them before and I know how that goes: you might as well write it out, roll up the paper, tuck it into a bottle, and toss it into the sea.
Short answer, yes.
Looking at other blogs you can see this sort of thing:
which isn't just invalid, it's just random.
That BlogItemCommentFormOnclick thing ought to be inside an "onclick" attribute, perhaps? It definitely looks like it's an error, missing some other component, or left over from a previous version.
posted by AmbroseChapel at 2:36 PM on November 5, 2005
Looking at other blogs you can see this sort of thing:
<a class="comment-link" href="http://www.blogger.com/comment.g?blogID=foo&postID=bar" location.href=http://www.blogger.com/comment.g?blogID=foo&postID=bar;>
which isn't just invalid, it's just random.
That BlogItemCommentFormOnclick thing ought to be inside an "onclick" attribute, perhaps? It definitely looks like it's an error, missing some other component, or left over from a previous version.
posted by AmbroseChapel at 2:36 PM on November 5, 2005
Response by poster: It's possible I caused the problem in the first place; I've been tweaking the template for over a year and I don't remember worrying about whether it validated any time before last week. At any rate, I dropped the BlogItemCommentFormOnclick tag and all the validation errors disappeared.
As far as I can tell, everything still works, so all's well that ends well.
posted by Tuwa at 2:57 PM on November 5, 2005
As far as I can tell, everything still works, so all's well that ends well.
posted by Tuwa at 2:57 PM on November 5, 2005
I'm confused. How did you get it to validate? I've done everything I can think of and I still have two errors that seem to relate to the navbar. How do you get rid of the navbar errors?
posted by panoptican at 4:23 PM on November 5, 2005
posted by panoptican at 4:23 PM on November 5, 2005
Oh nevermind, you're transitional and I'm strict... whatever that means. If anyone knows if it's possible to make your Blogger code XHTML strict, let me know...
posted by panoptican at 4:24 PM on November 5, 2005
posted by panoptican at 4:24 PM on November 5, 2005
This thread is closed to new comments.
posted by riffola at 11:18 AM on November 5, 2005