fixed bug where checking for new NS-style attachment was wiping old-style attachment in HTML output
Merge branch 'release-1.6.13'