From 74dd2f7980ea8ec434a6e0565d857c910653ed9b Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 9 Jan 2013 22:07:33 -0800 Subject: fix($compile): safely create transclude comment nodes Closes #1740 --- test/ng/compileSpec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/ng/compileSpec.js') diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 5b644af9..927a4ef7 100644 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -2241,5 +2241,15 @@ describe('$compile', function() { expect(nodeName_(comment)).toBe('#comment'); }); }); + + + it('should safely create transclude comment node and not break with "-->"', + inject(function($rootScope) { + // see: https://github.com/angular/angular.js/issues/1740 + element = $compile('')($rootScope); + $rootScope.$digest(); + + expect(element.text()).toBe('-->|x|'); + })); }); }); -- cgit v1.2.3