Giter VIP home page Giter VIP logo

Comments (13)

isaaclimdc avatar isaaclimdc commented on May 16, 2024

This is also the case for me! A fix for this would be great!

from jlroutes.

aelam avatar aelam commented on May 16, 2024

maybe base64 can fix this, but I don't think it's the best way

Sent from my iPhone

On Jul 23, 2014, at 7:54 AM, Isaac Lim [email protected] wrote:

This is also the case for me! A fix for this would be great!


Reply to this email directly or view it on GitHub.

from jlroutes.

joeldev avatar joeldev commented on May 16, 2024

It seems that NSURL pathComponent parsing doesn't like this. Is it possibly to simply not have "http://" as part of the URL? I could make a special case for http(s), but that seems dirty. I'll have to ponder this one a bit.

from jlroutes.

kylebshr avatar kylebshr commented on May 16, 2024

+1 for passing URLs

from jlroutes.

aelam avatar aelam commented on May 16, 2024

In the end. I change to Web?url=encodedUrl(). It can work

from jlroutes.

btxkenshin avatar btxkenshin commented on May 16, 2024

@aelam what does this mean?
At first,you said:

I defiend myapp://web/:URLString
URLString will be URLencoded before,
it would be myapp://web/http%3A%2F%2Fbaidu.com

So,what do you mean by change to Web?url=encodedUrl(),need help really

from jlroutes.

aelam avatar aelam commented on May 16, 2024

I mean it can't be parsed correctly in the pattern of myapp://web/:encodedURLString
But if you modify it to myapp://web?url=encodedURLString. it does

from jlroutes.

btxkenshin avatar btxkenshin commented on May 16, 2024

got it,It seems better to manual modify the parser logic

Thanks!

from jlroutes.

btxkenshin avatar btxkenshin commented on May 16, 2024

@aelam got a new problem
if the encodedURLString is something like http://xxx.xxx?aa=xx&bb=xx, then you will never get the correct url,for example

[JLRoutes addRoute:@"/web/rich/*" handler:^BOOL(NSDictionary *parameters) {
        NSString *url = parameters[@"url"];
       //do the navigation
    }];

Instead, you will get parameters url,aa,bb...

from jlroutes.

aelam avatar aelam commented on May 16, 2024

encodedURLString means the url string should be encoded
You didn't

发自我的 iPhone

在 2016年1月5日,下午9:04,btxkenshin [email protected] 写道:

@aelam got a new problem
if the encodedURLString is somethin like http://xxx.xxx?aa=xx&bb=xx, then you will never get the correct url,for example

[JLRoutes addRoute:@"/web/rich/*" handler:^BOOL(NSDictionary *parameters) {
NSString *url = parameters[@"url"];
//do the navigation
}];
Instead, you will get parameters url,aa,bb...


Reply to this email directly or view it on GitHub.

from jlroutes.

btxkenshin avatar btxkenshin commented on May 16, 2024

Do you ever have a try?or,it must be something missing?

It seems that the character: & will not be encoded, so the JLRoutes will parse these & into extern key-value parmaters.

Any way , i modify the parser, manuly parse the pathComponents instead of the default URL. pathComponents to handle this.

from jlroutes.

aelam avatar aelam commented on May 16, 2024

Firstly, encode

http://www.baidu.com?a=b&c=d

It should be
http%3a%2f%2fwww.baidu.com%3fa%3db%26c%3dd

Otherwise, your code of urlencode is wrong
Try 'pod search urlencode
Use the first one

Be attention.
Encode the whole url (including the query part)
And then try
Your-scheme://web?url=xxx

Sent from my iPhone

On Jan 7, 2016, at 12:32 PM, btxkenshin [email protected] wrote:

Do you ever have a try?or,it must be something missing?

It seems that the character: & will not be encoded, so the JLRoutes will parse these & into extern key-value parmaters.

Any way , i modify the parser, manuly parse the pathComponents instead of the default URL. pathComponents to handle this.


Reply to this email directly or view it on GitHub.

from jlroutes.

aelam avatar aelam commented on May 16, 2024

Great!

from jlroutes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.