[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-08 Thread alistairholt
Thanks for opening the ticket. I could use that but I don't think it would give me what I'm looking for.. my is full of HTML junk (needed for syntax highlighting) from Textmate. Have a look at http://pastie.org/230104 for an example. On 8 Jul, 15:55, Dave Methvin <[EMAIL PROTECTED]> wrote: > > T

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-08 Thread Dave Methvin
> The problem for me is that using text() in IE 6/7 doesn't preserve > whitespace... As a workaround, you can use an expression like this: var pre = $("").get(0); alert(pre.innerText || pre.textContent); All the browsers seem to support one property or the other--or both. Their text output isn

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-08 Thread alistairholt
The problem for me is that using text() in IE 6/7 doesn't preserve whitespace... On 8 Jul, 04:22, Dave Methvin <[EMAIL PROTECTED]> wrote: > > Results are athttp://pastie.org/228916 > > The code for jQuery.text has changed a lot in two years, but those > test results still look pretty familiar...

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-07 Thread Dave Methvin
> Results are at http://pastie.org/228916 The code for jQuery.text has changed a lot in two years, but those test results still look pretty familiar... :-)

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-07 Thread alistairholt
html() would be no good for what I'm trying to do. Basically I have blocks which contain pre-formatted source code (including a lot of extra html spans and what not for syntax highlighting and line numbering). I then take the text() of the 's and insert it into a which will now contain a plain t

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-07 Thread Dan G. Switzer, II
>I'm having some issues when calling $("something").text() in IE 6/7. >Basically I'm getting the calling text() on a element which is >whitespace sensitive. In Firefox and Safari it works perfectly >returning the text with whitespace intact. Is it possible to make it >work in IE or shall I give u

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-07 Thread alistairholt
Results are at http://pastie.org/228916 On 7 Jul, 01:17, "John Resig" <[EMAIL PROTECTED]> wrote: > I'm fairly certain that our .text() support has changed a lot since > October 2006 (!). It would be interesting to re-examine this issue - > if there are any current problems I know that we'd really

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-07 Thread alistairholt
Thanks guys. I'll run the test and post the results ASAP. On Jul 7, 1:17 am, "John Resig" <[EMAIL PROTECTED]> wrote: > I'm fairly certain that our .text() support has changed a lot since > October 2006 (!). It would be interesting to re-examine this issue - > if there are any current problems I k

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-06 Thread John Resig
I'm fairly certain that our .text() support has changed a lot since October 2006 (!). It would be interesting to re-examine this issue - if there are any current problems I know that we'd really like to get them fixed. --John On Sun, Jul 6, 2008 at 8:05 PM, Dave Methvin <[EMAIL PROTECTED]> wrot

[jQuery] Re: $("something").text() doesn't preserve whitespace in IE

2008-07-06 Thread Dave Methvin
> I'm having some issues when calling $("something").text() in IE 6/7. > Basically I'm getting the calling text() on a element which is > whitespace sensitive. In Firefox and Safari it works perfectly > returning the text with whitespace intact. Is it possible to make it > work in IE or shall I g