diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-26 06:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-26 06:09:21 +0300 |
commit | 88a161660fc48c4c1a94b51d5c72fdadffc1b1ae (patch) | |
tree | 466b87a16ad25ac602a9b3c5edaaa582f3eddd94 /app/assets | |
parent | 9190fb4bdcb7e1189de69de53a523c5aeff71f91 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue index a49eb7fd611..04ab0fd00aa 100644 --- a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue @@ -3,6 +3,8 @@ import { throttle } from 'lodash'; import { numberToHumanSize } from '~/lib/utils/number_utils'; import { encodeSaferUrl } from '~/lib/utils/url_utility'; +const BLOB_PREFIX = 'blob:'; + export default { props: { path: { @@ -45,7 +47,7 @@ export default { return this.width && this.height; }, safePath() { - return encodeSaferUrl(this.path); + return this.path.startsWith(BLOB_PREFIX) ? this.path : encodeSaferUrl(this.path); }, }, beforeDestroy() { |