diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-18 13:53:45 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-01-20 16:20:15 +0100 |
commit | af5ffd12f9c23ecf34e1f24b36804623479d44e9 (patch) | |
tree | ce60a22509f08b6bacc3036be264bfb77b957230 /plugins/base/public/message.html | |
parent | 577685ca147b0879157f1b8b1841ab7790577358 (diff) | |
download | alps-af5ffd12f9c23ecf34e1f24b36804623479d44e9.tar.gz alps-af5ffd12f9c23ecf34e1f24b36804623479d44e9.zip |
Add support for HTML parts
Diffstat (limited to 'plugins/base/public/message.html')
-rw-r--r-- | plugins/base/public/message.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/base/public/message.html b/plugins/base/public/message.html index 89fd4dd..6ce633b 100644 --- a/plugins/base/public/message.html +++ b/plugins/base/public/message.html @@ -112,7 +112,12 @@ {{if .Body}} <p><a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a></p> - <pre>{{.Body}}</pre> + {{if .IsHTML}} + <!-- TODO: add a src fallback --> + <iframe srcdoc="{{.Body}}" sandbox></iframe> + {{else}} + <pre>{{.Body}}</pre> + {{end}} {{else}} <p>Can't preview this message part.</p> <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a> |