Question
Add "\n" to tags in nested HTML
I need to prepare html for sending via the Postmark API.
Given the following:
<cfset vHTML = "<html><body><div>This is html</div></body></html>">What would be the cleanest way to arrive at:
<cfset vPostmarkHTML = "<html>\n<body>\n<div>This is postmark html</div>\n</body>\n</html>">i.e. surround every nested tag group with "\n" except the outer <html> group
