-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($location) solve when url is "javascript:" or "mailto:" #8407
Conversation
When url is started with "javascript:" or "mailto:" It still do the redirect.
I like this -- in the mean time, there are work arounds, like I think we should get this in this week though, can you fix the indentation and follow the google style guide? We want the conditional statement to be readable in order to make future work on it easier. |
I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let us know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
CLA signature verified! Thank you! Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes). |
@winsontam could you please add some test cases for this CL?and correct the code style issues like I've mentioned before? with tests/fixes, I'd like to land this for the release this week, times running out though =) |
…or "mailto:" link Previously, absent a specified target attribute, when clicking on an anchor tag with an href beginning with either "javascript:" or "mailto:", the framework would rewrite the URL, when it ought not to. With this change, the browser is prevented from rewriting if the URL begins with a case-insensitive match for "javascript:" or "mailto:", optionally preceeded by whitespace. Closes angular#8407 Closes angular#8425
…or "mailto:" link Previously, absent a specified target attribute, when clicking on an anchor tag with an href beginning with either "javascript:" or "mailto:", the framework would rewrite the URL, when it ought not to. With this change, the browser is prevented from rewriting if the URL begins with a case-insensitive match for "javascript:" or "mailto:", optionally preceeded by whitespace. Closes angular#8407 Closes angular#8425
don't worry about fixing it up, I've made the adjustments I wanted, I'll try to get that checked in tomorrow |
…or "mailto:" link Previously, absent a specified target attribute, when clicking on an anchor tag with an href beginning with either "javascript:" or "mailto:", the framework would rewrite the URL, when it ought not to. With this change, the browser is prevented from rewriting if the URL begins with a case-insensitive match for "javascript:" or "mailto:", optionally preceeded by whitespace. Closes #8407 Closes #8425 Closes #8426
When url is started with "javascript:" or "mailto:"
It still do the redirect.