Greetings,

I'm trying to use Replace to work-around the fact that ".append()" and
".html()" strips any <script>..</script> tag(and everything in between?).
ie. i was trying to do:

$.get("SOMEURLGIVINGdataOUTPUT,function(data){
$("li#SOMEid").append(data.replace(/script/g,"escape"));
$("li#SOMEid").html($("li#SOMEid").html().replace(/escape/g,"script"));

but .html() still manage to strip the <script> tags..

do you have any pointers?
sorry if this is an appropriate type of reply =[.

Thank you for your time,
Regards,

Ernest.

> >
> > You almost have it. The "each" function actually returns the "raw" DOM
> > element so to use jQuery you'll need to "enclose" this.
> >
> > Just replace the core with:
> >
> > var $this = $(this);
> > $this.html( $this.html().replace(/index.cfm?a=wiki&tag=/gi, "") );
> >
> > Karl Rudd
> >
> > On 2/28/07, Yansky <[EMAIL PROTECTED]> wrote:
> >>
> >> I have many of the following type of links on a page:
> >> < a
> >>
> href="htp://foo.com/index.cfm?a=wiki&tag=abc">htp://foo.com/index.cfm?a=wiki&tag=abc
> >>
> >> I'm trying to remove the text in between the span tags so that only the
> >> text
> >> after http://foo.com/index.cfm?a=wiki&tag= is showing. I have tried the
> >> following, but it doesn't seem to work.
> >>
> >> $('a > span').contains('index.cfm?a=wiki&tag=').each(function(i){
> >>   this.text().replace(/index.cfm?a=wiki&tag=/gi, "");
> >> });
> >>
> >> Can anyone point me in the right direction?
> >> Cheers.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Replace-text-in-array-tf3308186.html#a9201977
> >> Sent from the JQuery mailing list archive at Nabble.com.
> >>
> >>
> >> _______________________________________________
> >> jQuery mailing list
> >> [EMAIL PROTECTED]
> >> http://jquery.com/discuss/
> >>
> >
> > _______________________________________________
> > jQuery mailing list
> > [EMAIL PROTECTED]
> > http://jquery.com/discuss/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Replace-text-in-array-tf3308186.html#a9202631
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> _______________________________________________
> jQuery mailing list
> [EMAIL PROTECTED]
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
[EMAIL PROTECTED]
http://jquery.com/discuss/





-- 
View this message in context: 
http://www.nabble.com/Replace-text-in-array-tp9201977s27240p19140490.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to