Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5e22767

Browse files
committed
fixup! fix(grunt-utils): insert the core CSS styles without using innerHTML
1 parent dab168d commit 5e22767

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/grunt/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ module.exports = {
111111
.replace(/\\/g, '\\\\')
112112
.replace(/'/g, '\\\'')
113113
.replace(/\r?\n/g, '\\n');
114-
js = '!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(window.angular.element("<style>").text(\'' + css + '\'));';
114+
js = '!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(window.angular.element(\'<style>\').text(\'' + css + '\'));';
115115
state.js.push(js);
116116

117117
return state;

test/e2e/tests/sample.spec.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ describe('Sample', function() {
1212

1313
it('should insert the ng-cloak styles', function() {
1414
browser.executeScript(`
15-
var span = document.createElement('span');
16-
span.className = 'ng-cloak foo';
17-
document.body.appendChild(span);`);
15+
var span = document.createElement('span');
16+
span.className = 'ng-cloak foo';
17+
document.body.appendChild(span);
18+
`);
1819
expect(element(by.className('foo')).isDisplayed()).toBe(false);
1920
});
2021
});

0 commit comments

Comments
 (0)