Opened 13 years ago
Closed 13 years ago
#7073 closed bug (wontfix)
The .text() function doesn't return contents of a non-script script tag in IE (7, 8)
Reported by: | Pointy | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | manipulation | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Mr. Resig has blogged about (and therefore promoted) the use of script tags with funny, non-Javascript "type" attributes as a way to store things like template bodies. This is a fine idea and I have no complaints. However, the ".text()" function does not return the contents of such script tags on IE, while ".html()" does. The ".text()" function does work in Firefox and Chrome (haven't tried anything else).
Seems to me that ".text()" should work in this case, or at least behave uniformly.
Change History (2)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Just use .html
, which already works uniformly across all browsers.
Note: See
TracTickets for help on using
tickets.
I guess this is a
wontfix
as it is up to the user agent to decide what to do with<script>
tags which have a value set for thetype
attribute the user agent doesn't know how to handle.IE seems to ignore such
<script>
tags and just places the content in theinnerHTML
property but haschildNodes.length == 0
thustext()
fails to find anything as there are notTextNode
element to get the text from in IE