Commit 035d45b9 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'djadmin-remove-redundant-sanitization' into 'master'

Remove redundant sanitization method in notebook component

See merge request gitlab-org/gitlab!69151
parents 8df072db 41d4f2fb
<script> <script>
import { GlSafeHtmlDirective } from '@gitlab/ui'; import { GlSafeHtmlDirective } from '@gitlab/ui';
import { sanitize } from '~/lib/dompurify';
import Prompt from '../prompt.vue'; import Prompt from '../prompt.vue';
export default { export default {
...@@ -25,9 +24,6 @@ export default { ...@@ -25,9 +24,6 @@ export default {
}, },
}, },
computed: { computed: {
sanitizedOutput() {
return sanitize(this.rawCode);
},
showOutput() { showOutput() {
return this.index === 0; return this.index === 0;
}, },
...@@ -38,6 +34,6 @@ export default { ...@@ -38,6 +34,6 @@ export default {
<template> <template>
<div class="output"> <div class="output">
<prompt type="Out" :count="count" :show-output="showOutput" /> <prompt type="Out" :count="count" :show-output="showOutput" />
<div v-safe-html="sanitizedOutput" class="gl-overflow-auto"></div> <div v-safe-html="rawCode" class="gl-overflow-auto"></div>
</div> </div>
</template> </template>
...@@ -90,7 +90,8 @@ export default [ ...@@ -90,7 +90,8 @@ export default [
' </g>\n', ' </g>\n',
'</svg>', '</svg>',
].join(), ].join(),
output: '<svg height="115.02pt" id="svg2"', output:
'<svg xmlns="http://www.w3.org/2000/svg" width="388.84pt" version="1.0" id="svg2" height="115.02pt">',
}, },
], ],
]; ];
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment