Titanium encodeURIComponent returns different value iOS / Android

北城余情 提交于 2019-12-11 06:27:59

问题


This simple script returns deferrent values for iOS/Android.

My environment is titanium 6.0.1.GA

var name = "arn:aws:sns:ap-northeast-1";

Ti.API.info("encodeTest:" + encodeURIComponent(name);

[iOS]

encodeTest:arn%3Aaws%3Asns%3Aap-northeast-1

[android]

encodeTest:arn%%3Aaws%%3Asns%%3Aap-northeast-1

somehow in android escape character '%' is doubled.

I have used this encodeURIComponent function many times before, but at that time (may be titanium 5.0.*.GA), it didn't happnen.

来源:https://stackoverflow.com/questions/43201488/titanium-encodeuricomponent-returns-different-value-ios-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!