You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ahmed Ibrahim Khalil (JIRA)" <ji...@apache.org> on 2013/05/27 13:44:20 UTC

[jira] [Updated] (CB-3517) CDVInAppBrowser not working when there are Arabic characters in the URL

     [ https://issues.apache.org/jira/browse/CB-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ahmed Ibrahim Khalil updated CB-3517:
-------------------------------------

    Description: 
When there are arabic characters in the URL for example like this URL 

http://example.com/Memos/34160417-1434هت%20بشان%20آلية%20تنظيم%20تكليف%20مديري%20المدارس%20الاهلية%20لعام%201434هـ%20--1435هـ.pdf

An Exception occurs inside the 

- (void)browserLoadStart:(NSURL*)url

as the url is nil 

I solved this issue by percentage escaping the URL

NSURL* absoluteUrl = [[NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] relativeToURL:baseUrl] absoluteURL]; (line 83 of the CDVInAppBrowser.m)



  was:
When there is arabic characters in the URL for example like this URL 

http://example.com/Memos/34160417-1434هت%20بشان%20آلية%20تنظيم%20تكليف%20مديري%20المدارس%20الاهلية%20لعام%201434هـ%20--1435هـ.pdf

An Exception occurs inside the 

- (void)browserLoadStart:(NSURL*)url

as the url is nil 

I solved this issue by percentage escaping the URL

NSURL* absoluteUrl = [[NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] relativeToURL:baseUrl] absoluteURL]; (line 83 of the CDVInAppBrowser.m)



    
> CDVInAppBrowser not working when there are Arabic characters in the URL
> -----------------------------------------------------------------------
>
>                 Key: CB-3517
>                 URL: https://issues.apache.org/jira/browse/CB-3517
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.6.0
>            Reporter: Ahmed Ibrahim Khalil
>            Assignee: Shazron Abdullah
>
> When there are arabic characters in the URL for example like this URL 
> http://example.com/Memos/34160417-1434هت%20بشان%20آلية%20تنظيم%20تكليف%20مديري%20المدارس%20الاهلية%20لعام%201434هـ%20--1435هـ.pdf
> An Exception occurs inside the 
> - (void)browserLoadStart:(NSURL*)url
> as the url is nil 
> I solved this issue by percentage escaping the URL
> NSURL* absoluteUrl = [[NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] relativeToURL:baseUrl] absoluteURL]; (line 83 of the CDVInAppBrowser.m)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira