Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL自动转义导致‘#’被转换 #11

Open
iamjjh opened this issue Aug 17, 2017 · 1 comment
Open

URL自动转义导致‘#’被转换 #11

iamjjh opened this issue Aug 17, 2017 · 1 comment

Comments

@iamjjh
Copy link

iamjjh commented Aug 17, 2017

  • (UIViewController *)initFromString:(NSString *)urlString fromConfig:(NSDictionary *)configDict{

    // 支持对中文字符的编码
    NSString *encodeStr = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
    return [UIViewController initFromURL:[NSURL URLWithString:encodeStr] withQuery:nil fromConfig:configDict];
    }

导致html中打不开对应的fagment
链接示例:http://some-site.com:999/dir1/dir2;param?field-1=value-1&field-2=value-2#anchor1

@DarielChen
Copy link
Owner

可以先拿到url的参数再做处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants