Otieno Rowland
Otieno Rowland

Reputation: 2250

Disqus script not well formed

Blogger keeps telling me that the script is not well formed, I have tried to test it in firebug, but I do not seem to detect the issue. Help out

    <script type='text/javascript'>
    (function() {
        var links = document.getElementsByTagName('a');
        var query = '?';
        for(var i = 0; i < links.length; i++) {
            if(links[i].href.indexOf('#disqus_thread') >= 0) {
                query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
            }
        }
        document.write('<script type="text/javascript" src="http://disqus.com/forums/hi-tech/get_num_replies.js' + query + '"></' + 'script>');
    })();
</script>

Upvotes: 0

Views: 65

Answers (1)

Quentin
Quentin

Reputation: 943518

See the HTML compatibility guidelines for XHTML.

Move your JS to an external script file, or wrap it in a CDATA block.

Upvotes: 1

Related Questions