|
@@ -224,17 +224,17 @@ describe('AttachmentViewer', function () {
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
it(
|
|
it(
|
|
|
- 'special case sanitizes potentially unsafe SVG previews',
|
|
|
|
|
|
|
+ 'sanitize potentially unsafe SVG previews',
|
|
|
function() {
|
|
function() {
|
|
|
document.body.innerHTML = bodyTemplate;
|
|
document.body.innerHTML = bodyTemplate;
|
|
|
PrivateBin.AttachmentViewer.init();
|
|
PrivateBin.AttachmentViewer.init();
|
|
|
PrivateBin.Model.init();
|
|
PrivateBin.Model.init();
|
|
|
global.atob = common.atob;
|
|
global.atob = common.atob;
|
|
|
|
|
|
|
|
- // special case: not a safe type, but renders a sanitized preview
|
|
|
|
|
const svgMimeTypes = [
|
|
const svgMimeTypes = [
|
|
|
'image/svg+xml',
|
|
'image/svg+xml',
|
|
|
'image/SVG+xml',
|
|
'image/SVG+xml',
|
|
|
|
|
+ 'image/SVG',
|
|
|
'image/sVg'
|
|
'image/sVg'
|
|
|
];
|
|
];
|
|
|
for (const mimeType of svgMimeTypes) {
|
|
for (const mimeType of svgMimeTypes) {
|