Skip to content

Instantly share code, notes, and snippets.

@romeoh
Created August 5, 2013 03:50
Show Gist options
  • Save romeoh/6153383 to your computer and use it in GitHub Desktop.
Save romeoh/6153383 to your computer and use it in GitHub Desktop.
uri encoder
encodeURI() / decodeURI()
최소한의 문자만 인코딩합니다.
; / ? : @ & = + $ , - _ . ! ~ * ' ( ) #
이런 문자는 인코딩하지 않습니다.
http:// ... 등은 그대로 나옵니다.
encodeURIComponent() / decodeURIComponent()
알파벳과 숫자 Alphanumeric Characters 외의, 대부분의 문자를 모두 인코딩합니다.
http:// ... 가 http%3A%2F%2F 로 됩니다.
escape() / unescape()
예전부터 있던 오래된 함수입니다. encodeURI() 와 encodeURIComponent() 의 중간 정도의 범위로 문자를 인코딩합니다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment