Commit cbe479b3 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'eugielimpin/remove-v-html' into 'master'

Replace v-html with v-safe-html in repository file table rows

See merge request gitlab-org/gitlab!70578
parents f5bb945a 7dda368f
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
GlLoadingIcon, GlLoadingIcon,
GlIcon, GlIcon,
GlHoverLoadDirective, GlHoverLoadDirective,
GlSafeHtmlDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { escapeRegExp } from 'lodash'; import { escapeRegExp } from 'lodash';
import filesQuery from 'shared_queries/repository/files.query.graphql'; import filesQuery from 'shared_queries/repository/files.query.graphql';
...@@ -33,6 +34,7 @@ export default { ...@@ -33,6 +34,7 @@ export default {
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
GlHoverLoad: GlHoverLoadDirective, GlHoverLoad: GlHoverLoadDirective,
SafeHtml: GlSafeHtmlDirective,
}, },
apollo: { apollo: {
commit: { commit: {
...@@ -178,6 +180,7 @@ export default { ...@@ -178,6 +180,7 @@ export default {
this.$apollo.query({ query, variables }); this.$apollo.query({ query, variables });
}, },
}, },
safeHtmlConfig: { ADD_TAGS: ['gl-emoji'] },
}; };
</script> </script>
...@@ -228,10 +231,10 @@ export default { ...@@ -228,10 +231,10 @@ export default {
<td class="d-none d-sm-table-cell tree-commit cursor-default"> <td class="d-none d-sm-table-cell tree-commit cursor-default">
<gl-link <gl-link
v-if="commit" v-if="commit"
v-safe-html:[$options.safeHtmlConfig]="commit.titleHtml"
:href="commit.commitPath" :href="commit.commitPath"
:title="commit.message" :title="commit.message"
class="str-truncated-100 tree-commit-link" class="str-truncated-100 tree-commit-link"
v-html="commit.titleHtml /* eslint-disable-line vue/no-v-html */"
/> />
<gl-skeleton-loading v-else :lines="1" class="h-auto" /> <gl-skeleton-loading v-else :lines="1" class="h-auto" />
</td> </td>
......
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