This project is archived and is in readonly mode.
Simplify regex for filtering non-ASCII chars in JSON escape
Reported by Akira Matsuda | June 29th, 2009 @ 09:38 AM | in 2.x
A regex in JSON escape seems to be too much complex. I even can't see whether it works as expected.
Attached a patch to simply filter out the non-ASCII chars.
Please ignore this patch if I misunderstood the spec, but it seems that the tests passes anyway.
Comments and changes to this ticket
-
Yehuda Katz (wycats) July 2nd, 2009 @ 12:25 AM
- State changed from new to invalid
It looks like the original regex was there for a reason. Do you have any reason to believe it's just arbitrary?
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>