Inspector crashes when a device name contained spaces
Reviewed By: Hypuk Differential Revision: D5434498 fbshipit-source-id: f758497ca50e4c02e436812725acfe0dcb8428b4
This commit is contained in:
parent
e5e9cab8ed
commit
9df79e7e96
|
@ -30,9 +30,10 @@ static NSString *getDebugServerHost(NSURL *bundleURL)
|
|||
|
||||
static NSURL *getInspectorDeviceUrl(NSURL *bundleURL)
|
||||
{
|
||||
NSString *escapedText = [[[UIDevice currentDevice] name] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
return [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/inspector/device?name=%@",
|
||||
getDebugServerHost(bundleURL),
|
||||
[[UIDevice currentDevice] name]]];
|
||||
escapedText]];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue