crabmail

Static HTML email archive viewer in Rust
git clone git://git.alexwennerberg.com/crabmail
Log | Files | Refs | README | LICENSE

commit 1f1b0dc325f1a43098336c5832d386c4c65743a8
parent 0dab82e19322f1007eb6bf2c3d4740ca5e2b5aeb
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat,  9 Apr 2022 14:14:16 -0700

add quick and dirty email obfuscation

Diffstat:
Msrc/templates/util.rs | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/templates/util.rs b/src/templates/util.rs @@ -14,6 +14,8 @@ pub fn xml_escape(text: &str, dest: &mut Vec<u8>) { b'>' => dest.extend_from_slice(b"&gt;"), b'"' => dest.extend_from_slice(b"&quot;"), b'\'' => dest.extend_from_slice(b"&#39;"), + // Quick and dirty email obfuscation + b'@' => dest.extend_from_slice(b"&#x40;"), _ => dest.push(c), } }