aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-21 14:54:30 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-21 14:54:30 +0100
commit3e9a26af773f5025e1540f9be5da952c448f1edd (patch)
tree2e703655023fadfac37be6d7d6921c217628b2ea
parent75278be9b54e96d69668214de968a4517f4ab6e6 (diff)
downloadfeed2imap-go-3e9a26af773f5025e1540f9be5da952c448f1edd.tar.gz
feed2imap-go-3e9a26af773f5025e1540f9be5da952c448f1edd.tar.bz2
feed2imap-go-3e9a26af773f5025e1540f9be5da952c448f1edd.zip
Strip `srcset` attribute
Diffstat (limited to '')
-rw-r--r--CHANGELOG.md4
-rw-r--r--internal/feed/mail.go5
2 files changed, 8 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3dd9804..651c0c6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,8 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### Added
+- Remove `srcset` attribute of `img` tags when including images in mail
### Fixed
-- [Issue #39](https://github.com/Necoro/feed2imap-go/issues/39): Re-introduce deleted mails, even though `reupload-if-updated` is false.
+- [Issue #39](https://github.com/Necoro/feed2imap-go/issues/39): Do not re-introduce deleted mails, even though `reupload-if-updated` is false.
## [0.6.0] - 2021-02-14
### Fixed
diff --git a/internal/feed/mail.go b/internal/feed/mail.go
index 3010bfb..b201d61 100644
--- a/internal/feed/mail.go
+++ b/internal/feed/mail.go
@@ -328,6 +328,11 @@ func (item *item) buildBody() {
cid := "cid:" + cidNr(idx)
selection.SetAttr(attr, cid)
}
+
+ // srcset overrides src and would reload all the images
+ // we do not want to include all images in the srcset either, so just strip it
+ selection.RemoveAttr("srcset")
+
doneAnything = true
})