Bug 71772

Summary: Literal tab in JSONString fails
Product: WebKit Reporter: Charles Wei <charles.wei>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, charles.wei, erights, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Unspecified   
Attachments:
Description Flags
Fix oliver: review+

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. ***