Skip to content

Commit 75a8b20

Browse files
committed
[BUGFIX beta] Sanitize iframe attributes.
1 parent 676484c commit 75a8b20

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/ember-htmlbars/tests/attr_nodes/sanitized_test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ var badTags = [
3232
unquotedTemplate: compile("<img src={{url}}>"),
3333
quotedTemplate: compile("<img src='{{url}}'>"),
3434
multipartTemplate: compile("<img src='{{protocol}}{{path}}'>") },
35+
{ tag: 'iframe', attr: 'src',
36+
unquotedTemplate: compile("<iframe src={{url}}></iframe>"),
37+
quotedTemplate: compile("<iframe src='{{url}}'></iframe>"),
38+
multipartTemplate: compile("<iframe src='{{protocol}}{{path}}'></iframe>") }
3539
];
3640

3741
for (var i=0, l=badTags.length; i<l; i++) {

packages/ember-views/lib/system/sanitize_attribute_value.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ var badTags = {
1010
'A': true,
1111
'BODY': true,
1212
'LINK': true,
13-
'IMG': true
13+
'IMG': true,
14+
'IFRAME': true
1415
};
1516

1617
export var badAttributes = {

0 commit comments

Comments
 (0)