mirror of
https://github.com/aljazceru/njump.git
synced 2026-02-01 04:04:41 +01:00
Fix iframe/video rendering
This commit is contained in:
@@ -68,6 +68,16 @@ p {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
@media (max-width: 580px) {
|
||||
iframe {
|
||||
height: 250px;
|
||||
}
|
||||
}
|
||||
|
||||
.background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
||||
@@ -141,6 +141,13 @@ a {
|
||||
p {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
@media (max-width: 580px) {
|
||||
height: 250px;
|
||||
}
|
||||
}
|
||||
.background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
||||
@@ -60,5 +60,5 @@
|
||||
{{end}}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="/njump/static/styles.css?v=20230604" />
|
||||
<link rel="stylesheet" href="/njump/static/styles.css?v=20230606" />
|
||||
</head>
|
||||
|
||||
2
utils.go
2
utils.go
@@ -285,7 +285,7 @@ func sanitizeXSS(html string) string {
|
||||
p.AllowElements("video", "source", "iframe")
|
||||
p.AllowAttrs("controls", "width").OnElements("video")
|
||||
p.AllowAttrs("src", "width").OnElements("source")
|
||||
p.AllowAttrs("height", "width", "src", "frameborder").OnElements("iframe")
|
||||
p.AllowAttrs("src", "frameborder").OnElements("iframe")
|
||||
return p.Sanitize(html)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user