This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6337 - Incorrectly validating tags in javascript
Summary: Incorrectly validating tags in javascript
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-31 15:37 UTC by Sam Stevens
Modified: 2008-12-31 15:42 UTC (History)
0 users

See Also:


Attachments

Description Sam Stevens 2008-12-31 15:37:17 UTC
The following code will invalidate a document. As it counts the template html as being part of the document.

<script type="text/javascript" charset="utf-8">
window.onload = function() {
   getTwitters('Twitter', { 
     id: 14908033, 
     count: 5, 
     enableLinks: true, 
     ignoreReplies: true, 
     clearContents: true,
     template: '<a href="http://twitter.com/%user_screen_name%/statuses/%id%/" class="tweetLink">%time%</a><span class="tweet">%text%</span>'
   });
}
</script>
Comment 1 Olivier Thereaux 2008-12-31 15:42:26 UTC
Hi Sam,

I think you want:
http://validator.w3.org/docs/help.html#faq-javascript