From: Antonio Salazar Cardozo <savedfastc...@gmail.com>
Date: Wed, 31 Oct 2012 08:51:27 -0700 (PDT)
Local: Wed, Oct 31 2012 11:51 am
Subject: Re: Lift-json and the dreaded U+2028 character: to escape or not?
Hmm… Yeah, the double-traversal hit is mildly annoying, though we can I'm okay with the formats solution, or, because this is a fairly specific I should mention, according to this StackOverflow question<http://stackoverflow.com/questions/2965293/javascript-parse-error-on-...>, \u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060 -\u206f\ufeff\ufff0-\uffff
Thanks,
On Wednesday, October 31, 2012 4:11:59 AM UTC-4, Joni Freeman wrote:
> Hi,
> Comments inline...
> On Wednesday, October 31, 2012 8:18:35 AM UTC+2, Antonio Salazar Cardozo >> Whoopsies, reading too quickly there. Looks like some characters are >> So the question is, do we:
> I believe the following should work at the moment:
> json transform {
> (2) bake it in so u+202[89] are always escaped by lift-json
> I don't think there should be any Javascript specific behaviour bolted in. >> (3) insert some sort of toggle that allows us to enable this escaping, so > This is something we can consider. Solution (1) comes with a performance > private[json] def quote(s: String): String = {
> We could add a new case expression which would consult implicitly passed > case c if format.shouldEscape(c) => "\\u%04x".format(c: Int)
> If this change feels useful it can be scheduled to Lift 3.0. After all, it > def render(value: JValue): Document
> Cheers Joni
> Thoughts?
>> On Wednesday, October 31, 2012 12:55:45 AM UTC-4, Matt Feury wrote:
>>> Howdy Hi Hello,
>>> We ran into an interesting issue on our servers tonight, involving the >>> Essentially, someone inserted some data to our db with one of these >>> Now, I could easily escape these characters on my end, but I wonder if >>> Thoughts?
>>> Matt
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||