[GH-ISSUE #41] Attached images in HTML preview do not work #27

Closed
opened 2026-02-25 23:39:38 +03:00 by kerem · 1 comment
Owner

Originally created by @Cyberes on GitHub (May 9, 2022).
Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/41

Attached images in HTML preview section do not render. Here is an example:

Image kinda big

Screenshot from 2022-05-09 12-17-22

The images' src is always a non-URL. For example:

cid:37686D32@F0369F32.19717862.jpg

A fix for this issue is to rewrite the image tag's src in the HTML preview section. cid:37686D32@F0369F32.19717862.jpg would become http://example.com/api.php?a=attachment&email=test@example.com&id=12345&filename=test.jpg.

Also, < and > is getting rendered inside the Raw Email section as HTML. These characters need to be escaped.

Originally created by @Cyberes on GitHub (May 9, 2022). Original GitHub issue: https://github.com/HaschekSolutions/opentrashmail/issues/41 Attached images in HTML preview section do not render. Here is an example: <details> <summary>Image kinda big</summary> <br> ![Screenshot from 2022-05-09 12-17-22](https://user-images.githubusercontent.com/64224601/167472112-29c3b941-b69d-4af0-8486-d8fdd6d4a65f.png) </details> The images' `src` is always a non-URL. For example: ``` cid:37686D32@F0369F32.19717862.jpg ``` A fix for this issue is to rewrite the `image` tag's `src` in the HTML preview section. `cid:37686D32@F0369F32.19717862.jpg` would become `http://example.com/api.php?a=attachment&email=test@example.com&id=12345&filename=test.jpg`. Also, `<` and `>` is getting rendered inside the Raw Email section as HTML. These characters need to be escaped.
kerem closed this issue 2026-02-25 23:39:38 +03:00
Author
Owner

@geek-at commented on GitHub (Nov 20, 2023):

implemented in v1.1.3

<!-- gh-comment-id:1818394484 --> @geek-at commented on GitHub (Nov 20, 2023): implemented in v1.1.3
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentrashmail#27
No description provided.