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

Potential fix for #6162 #6421

Closed
wants to merge 2 commits into from
Closed

Potential fix for #6162 #6421

wants to merge 2 commits into from

Conversation

richardcrichardc
Copy link
Contributor

See #6162.

As noted in #6162, this fix is not ready to merge.

@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#6421)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@btford btford added this to the Backlog milestone Mar 27, 2014
@btford
Copy link
Contributor

btford commented Mar 27, 2014

Ping @caitp

@caitp
Copy link
Contributor

caitp commented Mar 27, 2014

Thanks, I'll look over this in a sec

var href = elm[0].getAttribute('href');

if (href.indexOf('://' == -1)) { // Ignore absolute URLs
if (href[0] == '/') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though old IE is not supported, it's probably better to use charAt() rather than the array index annotation --- and maybe just cache the value so that it doesn't need to be fetched multiple times.

caitp added a commit to caitp/angular.js that referenced this pull request Mar 28, 2014
@caitp
Copy link
Contributor

caitp commented Mar 28, 2014

@richardcrichardc I have done some extra work on this at #6899 --- It still needs to be cleaned up a bit more, but this is getting there.

caitp added a commit to caitp/angular.js that referenced this pull request Mar 28, 2014
caitp added a commit to caitp/angular.js that referenced this pull request Apr 9, 2014
…x them

This CL fixes problems and adds test cases for changes from angular#6421. Changes
include fixing the algorithm for preprocessing href attribute values, as
well as supporting xlink:href attributes.
@caitp caitp closed this in 3f04770 Apr 17, 2014
caitp added a commit that referenced this pull request Apr 17, 2014
…cy browsers

This CL fixes problems and adds test cases for changes from #6421. Changes
include fixing the algorithm for preprocessing href attribute values, as
well as supporting xlink:href attributes. Credit for the original URL
parsing algorithm still goes to @richardcrichardc.

Good work, champ!
caitp pushed a commit to caitp/angular.js that referenced this pull request Apr 17, 2014
…Mode

Previously, LocationHashbangInHtml5Url, which is used when html5Mode is enabled
in browsers which do not support the history API (IE8/9), would behave very
inconsistently WRT relative URLs always being resolved relative to the app root
url.

This fix enables these legacy browsers to behave like history enabled browsers,
by processing href attributes in order to resolve urls correctly.

Closes angular#6162
Closes angular#6421
Closes angular#6899
Closes angular#6832
Closes angular#6834
caitp added a commit to caitp/angular.js that referenced this pull request Apr 17, 2014
…cy browsers

This CL fixes problems and adds test cases for changes from angular#6421. Changes
include fixing the algorithm for preprocessing href attribute values, as
well as supporting xlink:href attributes. Credit for the original URL
parsing algorithm still goes to @richardcrichardc.

Good work, champ!
caitp pushed a commit that referenced this pull request Apr 18, 2014
…Mode

Previously, LocationHashbangInHtml5Url, which is used when html5Mode is enabled
in browsers which do not support the history API (IE8/9), would behave very
inconsistently WRT relative URLs always being resolved relative to the app root
url.

This fix enables these legacy browsers to behave like history enabled browsers,
by processing href attributes in order to resolve urls correctly.

Closes #6162
Closes #6421
Closes #6899
Closes #6832
Closes #6834
caitp added a commit that referenced this pull request Apr 18, 2014
…cy browsers

This CL fixes problems and adds test cases for changes from #6421. Changes
include fixing the algorithm for preprocessing href attribute values, as
well as supporting xlink:href attributes. Credit for the original URL
parsing algorithm still goes to @richardcrichardc.

Good work, champ!
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.

6 participants