Thursday, September 13, 2007

Don't override to_json like this

I don't know why our project override this method
class String
def to_json
"'#{self}'"
end
end

Because of this , The RJS totally don't work
and You get "unterminated string literal" because of not escaped javascript.

No comments: