diff --git a/js/test/AttachmentViewer.js b/js/test/AttachmentViewer.js index 029b0d84..f3016076 100644 --- a/js/test/AttachmentViewer.js +++ b/js/test/AttachmentViewer.js @@ -24,8 +24,12 @@ describe('AttachmentViewer', function () { ), results = [], result = ''; + // text node of attachment will truncate at null byte + if (filename === '\u0000') { + filename = ''; + } prefix = prefix.replace(/%(s|d)/g, '%%'); - postfix = postfix.replace(/%(s|d)/g, '%%'); + postfix = postfix.replace(/%(s|d)/g, '%%').replace(/<|>/g, ''); $('body').html( '' + '' + @@ -126,4 +130,3 @@ describe('AttachmentViewer', function () { ); }); }); -