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

corrupted minErr urls/redirection #8683

Closed
IgorMinar opened this issue Aug 20, 2014 · 3 comments
Closed

corrupted minErr urls/redirection #8683

IgorMinar opened this issue Aug 20, 2014 · 3 comments

Comments

@IgorMinar
Copy link
Contributor

I accidentally bootstrapped my app twice and got this error:

[ng:btstrpd] http://errors.angularjs.org/1.3.0-local+sha.e840be8/ng/btstrpd?p0=%3Cbody%20ng-app%3D%22%22%20class%3D%22ng-scope%22%3E

link

when navigating to the url I was redirected to:

https://docs.angularjs.org/error/ng/btstrpd?p0=%3Cbody%20ng-app%3D%22%22%20class%3D%22ng-scope%22%3E

link

The error page then didn't interpolate the argument from the url, so the error message was harder to read.

All I saw was:

App Already Bootstrapped with this Element ''

(notice the empty quoted string)

@IgorMinar IgorMinar added this to the 1.3.0-beta.19 milestone Aug 20, 2014
@IgorMinar
Copy link
Contributor Author

@jeffbcross or @btford can you look into this one please?

@jeffbcross jeffbcross self-assigned this Aug 20, 2014
@jeffbcross
Copy link
Contributor

looking...

@jeffbcross
Copy link
Contributor

Looks like we either need to escape the html or set the element's text instead of html. https://github.com/angular/angular.js/blob/master/docs/app/src/errors.js#L59

If I manually escape+encode the html, and visit: https://docs.angularjs.org/error/ng/btstrpd?p0=%26lt;body%20ng-app%3D%26quot;%26quot;%20class%3D%26quot;ng-scope%26quot;%26gt;

...everything works as expected.

jeffbcross added a commit to jeffbcross/angular.js that referenced this issue Aug 20, 2014
The $sanitize service was returning an empty string to the error page
because the input was usually a single html tag (sometimes it could be
`document`). This fix replaces angle brackets with html entities.

Closes angular#8683
jeffbcross added a commit that referenced this issue Aug 21, 2014
The $sanitize service was returning an empty string to the error page
because the input was usually a single html tag (sometimes it could be
`document`). This fix replaces angle brackets with html entities.

Closes #8683
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.