diff options
author | bob <bcz@cs.brown.edu> | 2019-05-20 13:25:06 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-05-20 13:25:06 -0400 |
commit | 9c8cd369019f1da21c75c07abecdbe3cf5da4cfe (patch) | |
tree | fcf389b2829c89f7a349101bc068e79017fca337 | |
parent | 850ac067fb4e62f91a6eee8df40fe95eca3a3326 (diff) |
only apply suffixes to urls that are on our server...
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
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); |