Easy solution to this basic HTML coding need posted over at Stack Overflow by a random clever bloke. Thanks RCB. My only issue was with UTF-8 characters coming through garbled. Bodged a workaround using this encode entities plug-in for Dreamweaver.
‘Cos I forget where I find these things – and as far as Base64 pattern generators go this one’s a doozy. An old doozy, but a doozy, nevertheless.