File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -295,3 +295,9 @@ func (p *Policy) AllowTables() {
295
295
CellVerticalAlign ,
296
296
).OnElements ("tbody" , "tfoot" )
297
297
}
298
+
299
+ func (p * Policy ) AllowIFrames (vals ... SandboxValue ) {
300
+ p .AllowAttrs ("sandbox" ).OnElements ("iframe" )
301
+
302
+ p .RequireSandboxOnIFrame (vals ... )
303
+ }
Original file line number Diff line number Diff line change @@ -702,6 +702,8 @@ func (p *Policy) AllowURLSchemeWithCustomPolicy(
702
702
return p
703
703
}
704
704
705
+ // RequireSandboxOnIFrame will result in all iframe tags having a sandbox="" tag
706
+ // Any sandbox values not specified here will be filtered from the generated HTML
705
707
func (p * Policy ) RequireSandboxOnIFrame (vals ... SandboxValue ) {
706
708
p .requireSandboxOnIFrame = make (map [string ]bool )
707
709
You can’t perform that action at this time.
0 commit comments