Bug 71772 - Literal tab in JSONString fails
Summary: Literal tab in JSONString fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 41102 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-07 23:39 PST by Charles Wei
Modified: 2012-03-07 17:36 PST (History)
4 users (show)

See Also:


Attachments
Fix (3.72 KB, patch)
2012-01-05 13:32 PST, Gavin Barraclough
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Wei 2011-11-07 23:39:36 PST
currently we fail this test case;

function test(){  /**  literal tab in JSONString */
    /*
    * Spec: 15.12.1.1
    * Spec grammar seems to insist that anything below U+001F is a "control
character"
    * and not allowed to appear literally in JSONString.
    * As JSON grammar isn't meant to change we're stuck with this even if
browsers so far aligned on allowing this..
    */
    var passed=false;
    try{
        JSON.parse(
            '{"test": " "}'   // Replace the space with Tab,  which can't be input here and converts to 4-spaces copy and paste
        );
    }catch(e){
        passed = true;
    }
    return passed;
}
Comment 1 Gavin Barraclough 2012-01-05 13:32:22 PST
Created attachment 121322 [details]
Fix
Comment 2 Gavin Barraclough 2012-01-05 13:57:39 PST
Fixed in r104212.
Comment 3 Gavin Barraclough 2012-03-07 17:36:59 PST
*** Bug 41102 has been marked as a duplicate of this bug. ***