escape url string
This commit is contained in:
parent
b7cbc49c01
commit
9eb797296c
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ void OpenItem(const base::FilePath& full_path) {
|
||||||
bool OpenExternal(const GURL& url) {
|
bool OpenExternal(const GURL& url) {
|
||||||
DCHECK([NSThread isMainThread]);
|
DCHECK([NSThread isMainThread]);
|
||||||
NSString* url_string = base::SysUTF8ToNSString(url.spec());
|
NSString* url_string = base::SysUTF8ToNSString(url.spec());
|
||||||
NSURL* ns_url = [NSURL URLWithString:url_string];
|
NSString* url_escaped_string = [url_string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
NSURL* ns_url = [NSURL URLWithString:url_escaped_string];
|
||||||
if (!ns_url) {
|
if (!ns_url) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue