Kaynağa Gözat

Open e-mail links in new tab

master
Simon Ser 4 yıl önce
ebeveyn
işleme
efaf6fd444
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: FDE7BE0E88F5E48
2 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. +2
    -1
      plugins/base/public/message.html
  2. +1
    -0
      plugins/base/routes.go

+ 2
- 1
plugins/base/public/message.html Dosyayı Görüntüle

@@ -115,7 +115,8 @@
{{if .IsHTML}}
<!-- TODO: add a src fallback -->
<!-- allow-same-origin is required to resize the frame with its content -->
<iframe id="email-frame" srcdoc="{{.Body}}" sandbox="allow-same-origin"></iframe>
<!-- allow-popups is required for target="_blank" links -->
<iframe id="email-frame" srcdoc="{{.Body}}" sandbox="allow-same-origin allow-popups"></iframe>
{{else}}
<pre>{{.Body}}</pre>
{{end}}


+ 1
- 0
plugins/base/routes.go Dosyayı Görüntüle

@@ -250,6 +250,7 @@ func handleGetPart(ctx *koushin.Context, raw bool) error {
// TODO: be more strict
p.AllowElements("style")
p.AllowAttrs("style")
p.AddTargetBlankToFullyQualifiedLinks(true)
body = p.Sanitize(body)
isHTML = true
}


Yükleniyor…
İptal
Kaydet