I see "String.inspect" don't escape quotes into unicode.
This behaviour needs for the following example:
<html>
<SCRIPT LANGUAGE="JAVASCRIPT" SRC="prototype.js"></SCRIPT>
<div id="myDiv">
empty
</div>
<script>
function blabla(message) {
var str = "<a href='javascript:alert(\""+message+"\")'>Hello</a>";
$("myDiv").innerHTML = str;
}
blabla("He\"llo");
</script>
</html>
If you click on link "Hello" javascript errors occurs. Solution is
escape quotes into unicode:
blabla("He\\u0022llo");
The above javascript code solve this problem.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---