aboutsummaryrefslogtreecommitdiffstats
path: root/src/AngularPublic.js
diff options
context:
space:
mode:
authorTobias Bosch2013-11-25 15:40:18 -0800
committerTobias Bosch2013-11-26 14:29:38 -0800
commit333523483f3ce6dd3177b697a5e5a7177ca364c8 (patch)
tree34cd700540680a7d9276cd1fe231b6f72fd232ae /src/AngularPublic.js
parent68ceb17272bdd2ebc838565070973d93704f4427 (diff)
downloadangular.js-333523483f3ce6dd3177b697a5e5a7177ca364c8.tar.bz2
fix($sanitize): Use same whitelist mechanism as $compile does.
`$sanitize` now uses the same mechanism as `$compile` to validate uris. By this, the validation in `$sanitize` is more general and can be configured in the same way as the one in `$compile`. Changes - Creates the new private service `$$sanitizeUri`. - Moves related specs from `compileSpec.js` into `sanitizeUriSpec.js`. - Refactors the `linky` filter to be less dependent on `$sanitize` internal functions. Fixes #3748.
Diffstat (limited to 'src/AngularPublic.js')
-rw-r--r--src/AngularPublic.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/AngularPublic.js b/src/AngularPublic.js
index eb97b4c5..d2c325c5 100644
--- a/src/AngularPublic.js
+++ b/src/AngularPublic.js
@@ -65,6 +65,7 @@
$ParseProvider,
$RootScopeProvider,
$QProvider,
+ $$SanitizeUriProvider,
$SceProvider,
$SceDelegateProvider,
$SnifferProvider,
@@ -136,6 +137,10 @@ function publishExternalAPI(angular){
angularModule('ng', ['ngLocale'], ['$provide',
function ngModule($provide) {
+ // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
+ $provide.provider({
+ $$sanitizeUri: $$SanitizeUriProvider
+ });
$provide.provider('$compile', $CompileProvider).
directive({
a: htmlAnchorDirective,