Angular2 Base64 sanitizing unsafe URL value

后端 未结 2 1284
长情又很酷
长情又很酷 2020-12-14 05:33

Response from my server looks like following:

[{\"coreGoalId\":1,\"title\":\"Core goal 1\",\"infrastructure\":\"Sample Infrastructure\",\"audience\":\"People         


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 06:08

    You would need

    bypassSecurityTrustResourceUrl(html);
    

    instead of

    bypassSecurityTrustHtml(html);
    

提交回复
热议问题