admin管理员组文章数量:1336632
Error: [$sanitize:badparse] The sanitizer was unable to parse the following block of html: <32
.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)
I am aware that it is because of the following issue: .2.18/$sanitize/badparse?p0=%3C32
"This error occurs when the HTML string passed to '$sanitize' can't be parsed by the sanitizer. The error contains part of the html string that can't be parsed.
The parser is more strict than a typical browser parser, so it's possible that some obscure input would produce this error despite the string being recognized as valid HTML by a browser."
My question is: how to trace this problem? From the stack trace alone, none of them refers to my code. Is there any tools which can help tracing this issue?
Error: [$sanitize:badparse] The sanitizer was unable to parse the following block of html: <32
http://errors.angularjs/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)
I am aware that it is because of the following issue: http://errors.angularjs/1.2.18/$sanitize/badparse?p0=%3C32
"This error occurs when the HTML string passed to '$sanitize' can't be parsed by the sanitizer. The error contains part of the html string that can't be parsed.
The parser is more strict than a typical browser parser, so it's possible that some obscure input would produce this error despite the string being recognized as valid HTML by a browser."
My question is: how to trace this problem? From the stack trace alone, none of them refers to my code. Is there any tools which can help tracing this issue?
Share Improve this question asked Sep 13, 2014 at 7:00 Pahlevi Fikri AuliyaPahlevi Fikri Auliya 4,5779 gold badges41 silver badges71 bronze badges 3- Not exact what you are looking for, but this may help you stackoverflow./questions/22533491/… – Justin Commented Dec 9, 2014 at 6:28
- Have you found the cause? In my case it was invalid html input. E.g. "Some<XT[2]>-<AAC[9]>". The parser thought this are html tags. In your case "<32" is an invalid tag name as well. – bubblez Commented Oct 26, 2015 at 15:37
- Hope this post: stackoverflow./questions/22533491/… help you – frederickha Commented Feb 2, 2016 at 5:05
1 Answer
Reset to default 6You can use Chrome Developer Tools (CDT) to catch caught JS exceptions (check "Pause on Caught Exceptions" checkbox in CDT). That may give you more information about your issue.
See https://developer.chrome./devtools/docs/javascript-debugging
本文标签:
版权声明:本文标题:javascript - How to trace: "The sanitizer was unable to parse the following block of html: <32"? - Stac 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742414268a2470402.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论