gazay/gon — pull request #80 by toothrot (2013-04-09 21:07:36+00:00)
Title: A few improvements to <script> functionality in Gon

Hi, your name is also Alex!

I was investigating an issue our application was having with Unicode Line separators, and noticed a regression in Gon. Gon used to handle \u2028 since it had backported the Rails escape_javascript helper, but this was removed somewhere down the line... https://github.com/gazay/gon/commit/ac33f7f01cb890dc97a4ae51ceda78230ba89fb9#L2R21

I've re-added this functionality.

Secondly, instead of escaping tags with unicode, we can simply use the CDATA section so we can ensure data in Gon doesn't close our script tag for us by accident =) See here for more info: http://www.w3schools.com/xml/xml_cdata.asp

Anyway, these changes were kind of major, so I'm expecting some feedback.

Have a good one!