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
e756f66b
Commit
e756f66b
authored
Nov 11, 2021
by
Dheeraj Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add v-safe-html to blob simple viewer
parent
7b03b44b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app/assets/javascripts/vue_shared/components/blob_viewers/simple_viewer.vue
...ipts/vue_shared/components/blob_viewers/simple_viewer.vue
+5
-2
No files found.
app/assets/javascripts/vue_shared/components/blob_viewers/simple_viewer.vue
View file @
e756f66b
<
script
>
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
GlSafeHtmlDirective
}
from
'
@gitlab/ui
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
HIGHLIGHT_CLASS_NAME
}
from
'
./constants
'
;
import
ViewerMixin
from
'
./mixins
'
;
...
...
@@ -9,6 +9,9 @@ export default {
components
:
{
GlIcon
,
},
directives
:
{
SafeHtml
:
GlSafeHtmlDirective
,
},
mixins
:
[
ViewerMixin
,
glFeatureFlagsMixin
()],
inject
:
[
'
blobHash
'
],
data
()
{
...
...
@@ -65,7 +68,7 @@ export default {
<div
class=
"blob-content"
>
<pre
class=
"code highlight"
><code
:data-blob-hash=
"blobHash"
v-html=
"content /* eslint-disable-line vue/no-v-html */
"
></code></pre>
><code
v-safe-html=
"content"
:data-blob-hash=
"blobHash
"
></code></pre>
</div>
</div>
</div>
...
...
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