0

I have tried this :

angular.module('dashboard').config(['$ocLazyLoadProvider', '$httpProvider', '$sceProvider',
        function($ocLazyLoadProvider, $httpProvider, $sceProvider) {
    $sceProvider.enabled(false);
}]);  

But nothing seems to happen. > is escaped by angular even with the so called sce app wide disablement. I can't seem to find anything besides the $sceProvider that could stop angular auto encoding html entities.

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
Geo C.
  • 755
  • 6
  • 18
  • What is your [actual problem](https://meta.stackexchange.com/q/66377)? I don't think that globally disabling escaping is a solution to anything. – Bergi Jun 12 '17 at 21:36
  • @Bergi It is a problem since every encoding is done server side ... – Geo C. Jun 12 '17 at 21:42
  • Don't mix up encoding and escaping! Also, are you sure that all data goes through the server at all? – Bergi Jun 12 '17 at 21:45
  • Yes, the response from the server includes the encoded html character ">" (encoded as >) . Angular seems to be encoding it again ... I don't know why the shift of security on client side ... One of the headaches when going for a "popular" tools. When client should be a no brainer job ... – Geo C. Jun 12 '17 at 21:49
  • Sorry for the missleading title which included "escape" term. Yes, encoding was the good term here, changed – Geo C. Jun 12 '17 at 21:51
  • No, that was just the wrong term. And yes, if you trust (all?!) your html coming from the server, then you should just state that instead of disabling security. – Bergi Jun 12 '17 at 22:52

0 Answers0