Skip to main content

Bug Tracker

Side navigation

#12943 closed bug (wontfix)

Opened November 22, 2012 02:33PM UTC

Closed December 03, 2012 06:06PM UTC

IE7: .text() returns empty string on <script> elements

Reported by: anonymous Owned by: rwaldron
Priority: low Milestone: 1.9
Component: attributes Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:


<script type="text/x-data">
some text
<script type="text/javascript">
var txt = $('script[type="text/x-data"]').text();

Expected: txt == 'some text'

Actual in IE7: text == ''

Attachments (0)
Change History (3)

Changed November 22, 2012 03:17PM UTC by dmethvin comment:1

component: unfiledattributes
milestone: None1.9
priority: undecidedlow
status: newopen

Related to #9832. Not sure if we'll land anything for this. For example, I can't see adding a .text() setter for script tags and expecting that to execute!

Changed December 03, 2012 05:17PM UTC by rwaldron comment:2

owner: → rwaldron
status: openassigned

Changed December 03, 2012 06:06PM UTC by rwaldron comment:3

resolution: → wontfix
status: assignedclosed

Use $('script[type="text/x-data"]').html() to return the contents of non-executable script elements