diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/assets/javascripts/pages/shared/wikis | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/assets/javascripts/pages/shared/wikis')
-rw-r--r-- | app/assets/javascripts/pages/shared/wikis/components/wiki_content.vue | 9 | ||||
-rw-r--r-- | app/assets/javascripts/pages/shared/wikis/render_gfm_facade.js | 5 |
2 files changed, 5 insertions, 9 deletions
diff --git a/app/assets/javascripts/pages/shared/wikis/components/wiki_content.vue b/app/assets/javascripts/pages/shared/wikis/components/wiki_content.vue index b72579276e8..b19809aff53 100644 --- a/app/assets/javascripts/pages/shared/wikis/components/wiki_content.vue +++ b/app/assets/javascripts/pages/shared/wikis/components/wiki_content.vue @@ -1,10 +1,11 @@ <script> -import { GlSkeletonLoader, GlSafeHtmlDirective, GlAlert } from '@gitlab/ui'; +import { GlSkeletonLoader, GlAlert } from '@gitlab/ui'; +import SafeHtml from '~/vue_shared/directives/safe_html'; import { createAlert } from '~/flash'; import { __ } from '~/locale'; import axios from '~/lib/utils/axios_utils'; import { handleLocationHash } from '~/lib/utils/common_utils'; -import { renderGFM } from '../render_gfm_facade'; +import { renderGFM } from '~/behaviors/markdown/render_gfm'; export default { components: { @@ -12,7 +13,7 @@ export default { GlAlert, }, directives: { - SafeHtml: GlSafeHtmlDirective, + SafeHtml, }, props: { getWikiContentUrl: { @@ -86,9 +87,9 @@ export default { <div v-else-if="!loadingContentFailed && !isLoadingContent" ref="content" + v-safe-html="content" data-qa-selector="wiki_page_content" data-testid="wiki-page-content" class="js-wiki-page-content md" - v-html="content /* eslint-disable-line vue/no-v-html */" ></div> </template> diff --git a/app/assets/javascripts/pages/shared/wikis/render_gfm_facade.js b/app/assets/javascripts/pages/shared/wikis/render_gfm_facade.js deleted file mode 100644 index 90cc2983153..00000000000 --- a/app/assets/javascripts/pages/shared/wikis/render_gfm_facade.js +++ /dev/null @@ -1,5 +0,0 @@ -import $ from 'jquery'; - -export const renderGFM = (el) => { - return $(el).renderGFM(); -}; |