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 be92255
1 file changed
+1
-1
lines changed| 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