incubator-wookie-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Wilson (JIRA)" <>
Subject [jira] Commented: (WOOKIE-42) Wookie rewrites HTML start file incorrectly when injecting JavaScript, where there are multiple <script> tags
Date Thu, 05 Nov 2009 23:27:32 GMT


Scott Wilson commented on WOOKIE-42:

Looking at this again it seems to be a problem that occurs when using self-closing script
tags. Even where these are technically OK in XHTML, recommended practice is to not use self-closing
tags for better HTML compatibility; some browsers are also unable to handle XHTML self-closing
script tags (e.g. IE7).

It seems that HtmlCleaner doesn't handle the odd case where they may be used correctly.

Short of submitting a workaround to HtmlCleaner this doesn't leave many options. I think perhaps
a FAQ entry could handle it for now.

> Wookie rewrites HTML start file incorrectly when injecting JavaScript, where there are
multiple <script> tags
> -------------------------------------------------------------------------------------------------------------
>                 Key: WOOKIE-42
>                 URL:
>             Project: Wookie
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 0.8.1
>            Reporter: Scott Wilson
>            Priority: Blocker
>             Fix For: 0.8.1
>         Attachments: tweetwatch.wgt
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> When uploading a widget which has multiple <script> tags in the <head> of
the start document, Wookie incorrectly repositions these within the file when it injects the
wookie wrapper scripts. For example, this:
> <head>
>     <script type="text/javascript" src="js/wmpkit.js"/>
>     <script type="text/javascript" src="js/json2.js"/>
>     <script type="text/javascript" src="js/script.js"></script>
>   </head>
>   <body>
>     <h1><img src="images/tweetWatch.png" alt="tweetWatch" /></h1>
>     <div id="content"></div>
>   </body>
> </html>
> Becomes:
> 	<head>
> 		<script type="text/javascript" src="/wookie/dwr/util.js"></script>
> 		<script type="text/javascript" src="/wookie/dwr/engine.js"></script>
> 		<script type="text/javascript" src="/wookie/dwr/interface/WidgetImpl.js"></script>
> 		<script type="text/javascript" src="/wookie/shared/js/wookie-wrapper.js"></script>
> 		<script type="text/javascript" src="js/script.js"></script>
> 	</head>
> 	<body>
> 		<script type="text/javascript" src="js/wmpkit.js">
> 			<script type="text/javascript" src="js/json2.js">
> 				<h1>
> 					<img src="images/tweetWatch.png" alt="tweetWatch" />
> 				</h1>
> 				<div id="content"></div>
> 			</script>
> 		</script>
> 	</body>
> </html>

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message