AS3将正斜杠转换为URL编码字符%2F
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AS3将正斜杠转换为URL编码字符%2F相关的知识,希望对你有一定的参考价值。
In AS2 forward slashes got url-encoded to %2F when you escaped them. But in AS3 they get ignored and left as they are. In some situations I have found that this can cause problems. So you can do it manually using this regular expression.
var myString:String = "/"; trace(myString); var urlEncodeForwardSlashedRegExp:RegExp = new RegExp("/", "gi"); myString = myString.replace(urlEncodeForwardSlashedRegExp, "%2F"); trace(myString); // OUTPUT // / // %2F
以上是关于AS3将正斜杠转换为URL编码字符%2F的主要内容,如果未能解决你的问题,请参考以下文章