Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5d852c6f
Commit
5d852c6f
authored
Sep 03, 2020
by
Takuya Noguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove v-html from diffs/.../diff_file.vue
Signed-off-by:
Takuya Noguchi
<
takninnovationresearch@gmail.com
>
parent
e36f62ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
app/assets/javascripts/diffs/components/diff_file.vue
app/assets/javascripts/diffs/components/diff_file.vue
+6
-4
No files found.
app/assets/javascripts/diffs/components/diff_file.vue
View file @
5d852c6f
<
script
>
/* eslint-disable vue/no-v-html */
import
{
mapActions
,
mapGetters
,
mapState
}
from
'
vuex
'
;
import
{
escape
}
from
'
lodash
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
,
GlSafeHtmlDirective
as
SafeHtml
}
from
'
@gitlab/ui
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
{
deprecatedCreateFlash
as
createFlash
}
from
'
~/flash
'
;
...
...
@@ -18,6 +17,9 @@ export default {
DiffContent
,
GlLoadingIcon
,
},
directives
:
{
SafeHtml
,
},
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
file
:
{
...
...
@@ -182,7 +184,7 @@ export default {
/>
<div
v-if=
"forkMessageVisible"
class=
"js-file-fork-suggestion-section file-fork-suggestion"
>
<span
class=
"file-fork-suggestion-note"
v-html=
"forkMessag
e"
></span>
<span
v-safe-html=
"forkMessage"
class=
"file-fork-suggestion-not
e"
></span>
<a
:href=
"file.fork_path"
class=
"js-fork-suggestion-button btn btn-grouped btn-inverted btn-success"
...
...
@@ -200,7 +202,7 @@ export default {
<template
v-else
>
<div
:id=
"`diff-content-$
{file.file_hash}`">
<div
v-if=
"errorMessage"
class=
"diff-viewer"
>
<div
class=
"nothing-here-block"
v-html=
"errorMessage
"
></div>
<div
v-safe-html=
"errorMessage"
class=
"nothing-here-block
"
></div>
</div>
<template
v-else
>
<div
v-show=
"isCollapsed"
class=
"nothing-here-block diff-collapsed"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment