Opened 12 years ago

Closed 12 years ago

#5121 closed defect (fixed)

[patch][cla] dojox.dtl has a problem with script tags on IE6

Reported by: guest Owned by: Neil Roberts
Priority: high Milestone: 1.1
Component: Dojox Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

This example test fail on IE6 but get passed on FF2, Opera9 and Safari3 (win).

function test_tag_script_static(t){

var dd = dojox.dtl;

var context = new dd.Context({

item: "apple"

}); var template = new dd.HtmlTemplate?('<div>Testo<script> func("apple") </script></div>');

t.is('<div>Testo<script> func("apple") </script></div>', dd.tests.html.util.render(template, context));

}, function test_tag_script_dynamic(t){

var dd = dojox.dtl;

var context = new dd.Context({

item: "apple"

}); var template = new dd.HtmlTemplate?('<div>Testo<script> func("{{ item }}") </script></div>');

t.is('<div>Testo<script> func("apple") </script></div>', dd.tests.html.util.render(template, context));

}

Attachments (1)

dtlScriptIeFix.patch (6.1 KB) - added by guest 12 years ago.
Provided by Alessandro Ferrari

Download all attachments as: .zip

Change History (9)

comment:1 Changed 12 years ago by Tom Trenka

Owner: changed from Tom Trenka to Neil Roberts

comment:2 Changed 12 years ago by guest

Probably the problem is related to the fact that IE script tags don't have a child text node with the script content.
I think we should use scriptNode.text property instead.

comment:3 Changed 12 years ago by Neil Roberts

I need to know why this would be done.

I've been scratching my head trying to figure out why this would be a good thing.

comment:4 in reply to:  3 Changed 12 years ago by guest

Replying to pottedmeat:

I need to know why this would be done.

I've been scratching my head trying to figure out why this would be a good thing.

I'm trying to add widget-in-template support and having script tag functional is needed for it.

comment:5 Changed 12 years ago by dylan

Milestone: 1.1
Summary: dojox.dtl has a problem with script tags on IE6[patch][cla] dojox.dtl has a problem with script tags on IE6

comment:6 in reply to:  description Changed 12 years ago by guest

Last patch's version contain a fix for a bug I've found in old patch with extensive test for Ticket #5950.

Changed 12 years ago by guest

Attachment: dtlScriptIeFix.patch added

Provided by Alessandro Ferrari

comment:7 in reply to:  description Changed 12 years ago by guest

New patch's version to sync with dojox.dtl code changes.

comment:8 Changed 12 years ago by Neil Roberts

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.