search

Home  >  Q&A  >  body text

angular.js - How to avoid XSS when rendering templates in angularJs?

Practical angularJs How to avoid unsafe tags in rendered data?

滿天的星座滿天的星座2830 days ago700

reply all(2)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-15 16:52:06

    By default, they have been filtered, so you don’t have to worry.

    Unless you manually configure it through ngSanitize, you can change this default behavior.

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-15 16:52:06

    Introduce ngSanitize 模块后用 directive ngBindHtml, such as:

    <p ng-bind-html="binding.html"></p>
    

    reply
    0
  • Cancelreply