Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
/angular.jsPublic archive

decodeURIComponent - prevent URIError#13993

Open
modmac wants to merge1 commit intoangular:master
base:master
Choose a base branch
Loading
frommodmac:patch-1
Open

decodeURIComponent - prevent URIError#13993

modmac wants to merge1 commit intoangular:masterfrommodmac:patch-1

Conversation

modmac
Copy link

Replace decodeURIComponent with tryDecodeURIComponent to prevent throwing "URIError: malformed URI sequence".

https://github.com/angular/angular.js/blob/master/src/Angular.js#L1275

Replace decodeURIComponent with tryDecodeURIComponent to prevent throwing "URIError: malformed URI sequence".https://github.com/angular/angular.js/blob/master/src/Angular.js#L1275
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝Please visithttps://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g.I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Checkyour existing CLA data and verify that youremail is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝Please visithttps://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g.I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Checkyour existing CLA data and verify that youremail is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@modmac
Copy link
Author

I signed it!

2016-02-10 15:34 GMT+01:00 googlebotnotifications@github.com:

Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).

[image: 📝]Please visithttps://cla.developers.google.com/
https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll

verify. Thanks.


Reply to this email directly or view it on GitHub
#13993 (comment).

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@gkalpak
Copy link
Member

I think this will break the contract that$location.path() or$location.hash() return a string.
OOC, under what circumstances can this error been thrown ? Do you have a reproduction.

There should also be some tests, verifying the new behavior and guarding against regressions.

@modmac
Copy link
Author

Yes, try to request a page with a #% hash in the URL.

Example:
https://console.developers.google.com/freetrial?newProject=false#%

Maybe in this example, if decodeURIComponent throws an error, we should catch it and encode hash/uri to keep wrong characters (ex. single %) as encoded UTF?

@gkalpak
Copy link
Member

Aha, I see the error.

TBH, trying to guess and fix unencoded UTF characters is a business I'd rather not be into :)
That said, silently failing on invalid URLs, won't be fun to debug. I think it's better to throw here.

@petebacondarwin, wdyt ?

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
@modmac@googlebot@gkalpak

[8]ページ先頭

©2009-2025 Movatter.jp