【小技】URL文字列エスケープ
【小技】URL文字列エスケープ
メソッドを公開しました。5パターンの変換に対応したつもりです。
https://github.com/miyako/4d-tips-encode-uri
EncodeURI RFC2396 / RFC3986(URL全体の変換に)
EncodeURIComponent RFC2396 / RFC3986(クエリ文字列の変換に)
QueryEscape(スペースを%20ではなく+に変換する)
参考記事
http://qiita.com/shibukawa/items/c0730092371c0e243f62
http://freak-da.hatenablog.com/entry/20080321/p1
https://github.com/miyako/4d-tips-encode-uri
EncodeURI RFC2396 / RFC3986(URL全体の変換に)
EncodeURIComponent RFC2396 / RFC3986(クエリ文字列の変換に)
QueryEscape(スペースを%20ではなく+に変換する)
参考記事
http://qiita.com/shibukawa/items/c0730092371c0e243f62
http://freak-da.hatenablog.com/entry/20080321/p1
miyako- 投稿数 : 468
登録日 : 2016/07/05
Permissions in this forum:
返信投稿: 不可
|
|