Commit 89e39704 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch '241878-Replace-v-html' into 'master'

Replace v-html with v-safe-html in simple_viewer.vue

Closes #241878

See merge request gitlab-org/gitlab!41218
parents e3e0e55b 8ce85c49
<script>
/* eslint-disable vue/no-v-html */
import { GlIcon } from '@gitlab/ui';
import { GlIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import ViewerMixin from './mixins';
import { HIGHLIGHT_CLASS_NAME } from './constants';
......@@ -8,6 +7,9 @@ export default {
components: {
GlIcon,
},
directives: {
SafeHtml,
},
mixins: [ViewerMixin],
data() {
return {
......@@ -64,7 +66,7 @@ export default {
</a>
</div>
<div class="blob-content">
<pre class="code highlight"><code id="blob-code-content" v-html="content"></code></pre>
<pre class="code highlight"><code id="blob-code-content" v-safe-html="content"></code></pre>
</div>
</div>
</template>
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