Commit 7448898e authored by mehulsharma's avatar mehulsharma

Replaced v-html with v-safe-html

Replaces v-html with v-safe html in app/assets/javascripts/error_tracking/components/stacktrace_entry.vue since it is a more secure alternative

Changelog: changed
parent 9213197a
<script> <script>
import { GlTooltip, GlSprintf, GlIcon } from '@gitlab/ui'; import { GlTooltip, GlSprintf, GlIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import FileIcon from '~/vue_shared/components/file_icon.vue'; import FileIcon from '~/vue_shared/components/file_icon.vue';
...@@ -12,6 +12,7 @@ export default { ...@@ -12,6 +12,7 @@ export default {
}, },
directives: { directives: {
GlTooltip, GlTooltip,
SafeHtml,
}, },
props: { props: {
lines: { lines: {
...@@ -129,9 +130,9 @@ export default { ...@@ -129,9 +130,9 @@ export default {
{{ lineNum(line) }} {{ lineNum(line) }}
</td> </td>
<td <td
v-safe-html="lineCode(line)"
class="line_content" class="line_content"
:class="{ old: isHighlighted(lineNum(line)) }" :class="{ old: isHighlighted(lineNum(line)) }"
v-html="lineCode(line) /* eslint-disable-line vue/no-v-html */"
></td> ></td>
</tr> </tr>
</template> </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