Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Simplify regex for filtering non-ASCII chars in JSON escape

#2850

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.

Reported by Akira Matsuda · June 29th, 2009 @ 09:38 AM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • 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?

    July 2nd, 2009 @ 12:25 AM