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 21372 - Parsing URLs inside <script> tags
Summary: Parsing URLs inside <script> tags
Status: RESOLVED INVALID
Alias: None
Product: LinkChecker
Classification: Unclassified
Component: checklink (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-22 09:41 UTC by WASD42
Modified: 2013-03-25 20:08 UTC (History)
0 users

See Also:


Attachments

Description WASD42 2013-03-22 09:41:10 UTC
LinkChecker tries to check links he finds inside <script> tags. In general it's a normal operation but it could be broken with following code:

<script type='text/javascript'>(function(){var d=document;d.write('<iframe src="'+'http://some.site.com/"></iframe>');})();</script>

In this situation LinkChecker will try to resolve following URL: '+'http://some.site.com/

That's incorrect and should be skipped.
Comment 1 Ville Skyttä 2013-03-25 20:08:53 UTC
That's right, in XHTML mode it does but doesn't in HTML mode, and that's the correct behavior. There's a good writeup on the subject at http://dorward.me.uk/www/comments-cdata/

See also http://www.w3.org/TR/xhtml1/#C_4