Hi,

I think you should convert <script>blah </script>
into
&lt;script &gt; blah &lt;/script&gt;

If you use PHP,  use htmlspecialchars function

example :

<?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; // &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;
?>


Thanks

YUAN


On Tue, May 20, 2008 at 11:26 PM, dezwald <[EMAIL PROTECTED]> wrote:

>
> hi there,
>
> i have a textarea box that i want to be able to save javascript code
> into a database. (which i have no problems doing)
>
> my problem is displaying the javascript code/script tags in my
> textarea after retreiving it from my database via ajax request. it
> won't show:
>
> <script>blah blah blah</script>
>
> i know that the js code/script tags are being retreived from the
> database because i can inspect ajax repsonse and see the script tags.
>
> i set the evalScripts var to false so that it will not evaluate js
> code and still i see nothing in my text area box.
>
> the only thing that will show is any text outside of the script tags.
>
>
> any help?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to