From 9c8cd369019f1da21c75c07abecdbe3cf5da4cfe Mon Sep 17 00:00:00 2001
From: bob <bcz@cs.brown.edu>
Date: Mon, 20 May 2019 13:25:06 -0400
Subject: only apply suffixes to urls that are on our server...

---
 src/client/views/nodes/ImageBox.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/client/views/nodes/ImageBox.tsx')

diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 1bd1b80a7..a2291c7cf 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -163,7 +163,7 @@ export class ImageBox extends DocComponent<FieldViewProps, ImageDocument>(ImageD
     }
 
     choosePath(url: URL) {
-        if (url.protocol === "data")
+        if (url.protocol === "data" || url.href.indexOf(window.location.origin) === -1)
             return url.href;
         let ext = path.extname(url.href);
         return url.href.replace(ext, this._curSuffix + ext);
-- 
cgit v1.2.3-70-g09d2

