Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($location) solve when url is "javascript:" or "mailto:" #8407

Closed
wants to merge 1 commit into from
Closed

fix($location) solve when url is "javascript:" or "mailto:" #8407

wants to merge 1 commit into from

Conversation

winsontam
Copy link
Contributor

When url is started with "javascript:" or "mailto:"
It still do the redirect.

When url is started with "javascript:" or "mailto:"
It still do the redirect.
@caitp
Copy link
Contributor

caitp commented Jul 30, 2014

I like this -- in the mean time, there are work arounds, like target="_self" will cause angular to ignore it.

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.

@caitp caitp added this to the 1.3.0-beta.18 milestone Jul 30, 2014
@mary-poppins
Copy link

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.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@mary-poppins
Copy link

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 winsontam removed the cla: no label Jul 31, 2014
@caitp
Copy link
Contributor

caitp commented Jul 31, 2014

@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 =)

caitp pushed a commit to caitp/angular.js that referenced this pull request Jul 31, 2014
…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
caitp pushed a commit to caitp/angular.js that referenced this pull request Jul 31, 2014
…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
@caitp
Copy link
Contributor

caitp commented Jul 31, 2014

don't worry about fixing it up, I've made the adjustments I wanted, I'll try to get that checked in tomorrow

caitp pushed a commit that referenced this pull request Jul 31, 2014
…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
@caitp caitp closed this in 97f230a Jul 31, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants