Skip to content
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

ajax: UserIDに相対パスが入れられる #130

Closed
azu opened this issue Aug 24, 2016 · 4 comments
Closed

ajax: UserIDに相対パスが入れられる #130

azu opened this issue Aug 24, 2016 · 4 comments
Assignees

Comments

@azu
Copy link
Collaborator

azu commented Aug 24, 2016

https://api.github.com/users/${userId} だと ../ みたいな任意のパスへリクエストできるなーと思った。(このサンプルだと何か出来るわけでもないのでいいけど)

ajax example 2016-08-24 10-12-49

正規表現でIDを絞るとかあると丁寧なのかも

@azu
Copy link
Collaborator Author

azu commented Sep 9, 2016

IDは英数字です みたいな話を追加するぐらい?

@lacolaco
Copy link
Collaborator

lacolaco commented Sep 9, 2016

脱線するんじゃないかと心配だけど、書いてみて考える。処理的には正規表現で弾いて終わり

@vvakame
Copy link

vvakame commented Sep 9, 2016

http://goo.gl/79E7xl 書いた(これは載らない(確信

@azu
Copy link
Collaborator Author

azu commented Sep 10, 2016

@laco0416 これ encodeURIComponent(userID) するのがいいんじゃないかなって気がしてきた。
これならズレた説明が別にいらないし、パス文字列にはならない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants