Error: [$sanitize:badparse] The sanitizer was unable to parse the following block of html: <32
http://errors.angularjs.org/1.2.18/$sanitize/badparse?p0=%3C32
at http://localhost:3000/assets/angular.js?body=1:79:12
at htmlParser (http://localhost:3000/assets/angular-sanitize.js?body=1:311:13)
at http://localhost:3000/assets/angular-sanitize.js?body=1:144:7
at getTrusted (http://localhost:3000/assets/angular.js?body=1:13336:16)
at Object.sce.(anonymous function) [as getTrustedHtml] (http://localhost:3000/assets/angular.js?body=1:14017:16)
at Object.ngBindHtmlWatchAction (http://localhost:3000/assets/angular.js?body=1:18146:25)
at Object.applyFunction [as fn] (<anonymous>:778:50)
at Scope.$digest (http://localhost:3000/assets/angular.js?body=1:12396:29)
at Scope.$delegate.__proto__.$digest (<anonymous>:844:31)
at Scope.$apply (http://localhost:3000/assets/angular.js?body=1:12661:24)
Sono consapevole che è a causa del seguente problema: http://errors.angularjs.org/1.2.18/ $ disinfettare/badparse p0 =% 3C32Come tracciare: "Il disinfettante non è stato in grado di analizzare il seguente blocco di html: <32"?
"Questo errore si verifica quando la stringa HTML passato al '$ disinfettare' non può? essere analizzato dal disinfettante. l'errore contiene parte della stringa HTML che non può essere analizzato.
il parser è più severo di un tipico parser del browser, quindi è possibile che alcuni input oscura produrrebbe questo errore nonostante la stringa venga riconosciuta a s HTML valido da un browser. "
La mia domanda è: come tracciare questo problema? Dalla sola traccia dello stack, nessuno di essi fa riferimento al mio codice. C'è qualche strumento che può aiutare a rintracciare questo problema?
non è esatta quello che stai cercando, ma questo può aiutare a http://stackoverflow.com/questions/22533491/angularjs-how-can-i-ignore -certain-html-tags – Justin
Hai trovato la causa? Nel mio caso era un input html non valido. Per esempio. "Some - ". Il parser pensava che fossero tag html. Nel tuo caso "<32" è anche un nome di tag non valido. –
bubblez
Spero che questo post: http://stackoverflow.com/questions/22533491/angularjs-how-can-i-ignore-certain-html-tags ti aiuta –