Commit 834f7de
feat: add client-side email viewer for .msg and .eml files
Renders Outlook MSG and RFC 822 EML files entirely in the browser
without server-side conversion.
- MSG files decoded with @kenjiuno/msgreader (bundled to browser IIFE
via frontend-maven-plugin + esbuild); patches PT_STRING8 into
TYPE_MAPPING to fix v1.11.0 field-decoding bug
- EML files parsed with eml-parse-js (UMD bundle from WebJar); wraps
readEml to suppress harmless InvalidCharacterError console noise from
the library's base64 auto-detection heuristic
- HTML bodies sanitised with DOMPurify (XSS protection); data: URIs
allowed on <img> so CID-resolved inline images survive sanitisation
- Inline CID images resolved to data URIs before sanitisation
- Attachments downloadable via Blob object-URLs (MSG uses
reader.getAttachment(); EML uses att.data64 base64 content)
- Uses $wnd.XMLHttpRequest throughout to keep ArrayBuffer in host-page
realm, avoiding cross-frame instanceof failures in the MSGReader bundle
- Viewer registered for PRONOM fmt/950 (EML), fmt/952 (MSG),
message/rfc822, application/vnd.ms-outlook, and .eml/.msg extensions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1cd1330 commit 834f7de
9 files changed
Lines changed: 685 additions & 0 deletions
File tree
- roda-ui/roda-wui
- src/main
- java/org/roda/wui/client/browse
- js
- resources
- config
- static
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
613 | 640 | | |
614 | 641 | | |
615 | 642 | | |
| |||
675 | 702 | | |
676 | 703 | | |
677 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
678 | 770 | | |
679 | 771 | | |
680 | 772 | | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
| |||
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
254 | 269 | | |
255 | 270 | | |
256 | 271 | | |
| |||
0 commit comments