We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
decodeEntities
1 parent 93ab22b commit 7c066e2Copy full SHA for 7c066e2
test/ngSanitize/sanitizeSpec.js
@@ -515,6 +515,16 @@ describe('decodeEntities', function() {
515
window.hiddenPre = origHiddenPre;
516
});
517
518
+ it('should unescape text', function() {
519
+ htmlParser('a<div>&</div>c', handler);
520
+ expect(text).toEqual('a<div>&</div>c');
521
+ });
522
+
523
+ it('should preserve whitespace', function() {
524
+ htmlParser(' a&b ', handler);
525
+ expect(text).toEqual(' a&b ');
526
527
528
it('should use innerText if textContent is not available (IE<9)', function() {
529
window.hiddenPre = {
530
innerText: 'INNER_TEXT'
0 commit comments