-
-
Notifications
You must be signed in to change notification settings - Fork 121
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参数包含中文,利用 requestId 生成新的 url就会有问题 #65
Comments
你是 POST 包含中文参数? |
GET请求,例如http://aa.com?city=北京 |
你有试过 URLEncode 吗 |
用URLEncode可以解决问题,但是旧项目很多地方存在这种请求,只能在KKJSBridgeAJAXProtocolHook.js统一处理, |
1 similar comment
用URLEncode可以解决问题,但是旧项目很多地方存在这种请求,只能在KKJSBridgeAJAXProtocolHook.js统一处理, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
//利用 requestId 生成新的 url
_KKJSBridgeXHR.generateNewUrlWithRequestId = function (url, requestId) {
...
var search = aTag.search ? aTag.search : "";
...
url = orignAction.replace(search, "").replace(hash, "");
.....
var newAction = url + aTag.search + aTag.hash;
return newAction;
};
如果url的参数包含中文,search拿到的是编码后的数据,replace替换方法就不起作用,客户端拿到的url就存在2个?
The text was updated successfully, but these errors were encountered: