Commit be92255
committed
fix: enable JavaScript in iframe
When an iframe contains the `sandbox` attribute, its value must be
exactly `allow-scripts` in order to enable JavaScript. However, in many
cases the attribute has more than one value. Here is an example:[^1]
```
sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"
```
We make the condition more flexible by using `contains`.
Fixes DocMarty84/miniflutt#30
[^1]: https://github.com/miniflux/v2/blob/3388f8e376632da49be8d8785422962ba83a8518/internal/reader/sanitizer/sanitizer.go#L2381 parent 79ec194 commit be92255Copy full SHA for be92255
File tree
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedOpen diff view settings
Filter options
- packages/flutter_html_iframe/lib
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedOpen diff view settings
Collapse file
packages/flutter_html_iframe/lib/iframe_mobile.dart
Copy file name to clipboardExpand all lines: packages/flutter_html_iframe/lib/iframe_mobile.dart+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | | - |
| 23 | + |
24 | 24 | |
25 | 25 | |
26 | 26 | |
|
0 commit comments