Just wanted to let you know that the e-mail obfuscation is breaking the JSON that get’s rendered for headless mode.:
SyntaxError: JSON.parse: expected ‘,’ or ‘}’ after property value in object at line
If I can make a suggestion, you are already writing into the comment “That way it is possible to separate email addresses within <a></a> tags from stand-alone ones.”, why not leave the ones in <a></a> tags alone and only obfuscate the single e-mails. Alternatively add a simple setting to turn this off, or escape the JS before putting it into the JSON string.