Skip to content

Commit a94a175

Browse files
committed
use URL-safe CID links
1 parent 0a5d549 commit a94a175

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/mime_message_viewer.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,7 @@ class _HtmlViewerState extends State<MimeMessageViewer> {
210210
}
211211
if (requestUri.isScheme('cid')) {
212212
// show inline part:
213-
var cid = requestUri.path;
214-
if ((cid.startsWith('%3C') && cid.endsWith('%3E')) ||
215-
(cid.startsWith('%3c') && cid.endsWith('%3e'))) {
216-
cid = '<${cid.substring('%3C'.length, cid.length - '%3E'.length)}>';
217-
}
213+
var cid = Uri.decodeComponent(requestUri.host);
218214
final part = widget.mimeMessage.getPartWithContentId(cid);
219215
if (part != null) {
220216
final mediaProvider =

0 commit comments

Comments
 (0)