Is there an angular JS command that will do HTML escaping on text? I am processing a custom directive and have need to escape some of the output which it generates.
It's not the straight solution, but if you'd dive into angular-sanitize code, you could find function encodeEntities. It's nice but private. Looking for usages of it you'd go to htmlSanitizeWriter, and then to sanitizeText.
It's still private but used in public filter linky.
Either you can explicitly use linky and hope that no links will be found, or reimplement sanitizeText or encodeEntities int your services.