HTML Encoding With ngBind

Words
61
Reading
1 min
Listen
Play
8y

We are building an application where we store HTML in a database to be retrieved and displayed to the user based on supplied queries. Well it works if you want the CODE to be displayed, but if you want to render that code, it needs to be sanitized. Here are some links and details to help you overcome this issue:

References:


  • https://odetocode.com/blogs/scott/archive/2014/09/10/a-journey-with-trusted-html-in-angularjs.aspx
  • https://stackoverflow.com/questions/33209938/what-is-the-purpose-of-angular-sanitize
  • https://css-tricks.com/complete-guide-table-element/
  • https://speckyboy.com/responsive-html-table-techniques/
  • https://angular.io/guide/displaying-data
  • https://docs.angularjs.org/api/ngSanitize
  • https://docs.angularjs.org/api/ngSanitize/service/$sanitize
HTML Encoding With ngBind | Ecency