Skip to content

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

Description

@iamjjh
  • (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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions