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
927dfce2
Commit
927dfce2
authored
Sep 08, 2021
by
Dheeraj Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to v-safe-html in Badge form
parent
36302fb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
app/assets/javascripts/badges/components/badge_form.vue
app/assets/javascripts/badges/components/badge_form.vue
+7
-3
No files found.
app/assets/javascripts/badges/components/badge_form.vue
View file @
927dfce2
<
script
>
<
script
>
import
{
GlLoadingIcon
,
GlFormInput
,
GlFormGroup
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
,
GlFormInput
,
GlFormGroup
,
GlButton
,
GlSafeHtmlDirective
}
from
'
@gitlab/ui
'
;
import
{
escape
,
debounce
}
from
'
lodash
'
;
import
{
escape
,
debounce
}
from
'
lodash
'
;
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
createFlash
from
'
~/flash
'
;
import
createFlash
from
'
~/flash
'
;
...
@@ -18,6 +18,9 @@ export default {
...
@@ -18,6 +18,9 @@ export default {
GlFormInput
,
GlFormInput
,
GlFormGroup
,
GlFormGroup
,
},
},
directives
:
{
SafeHtml
:
GlSafeHtmlDirective
,
},
props
:
{
props
:
{
isEditing
:
{
isEditing
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -167,6 +170,7 @@ export default {
...
@@ -167,6 +170,7 @@ export default {
});
});
},
},
},
},
safeHtmlConfig
:
{
ALLOW_TAGS
:
[
'
a
'
,
'
code
'
]
},
};
};
</
script
>
</
script
>
...
@@ -183,7 +187,7 @@ export default {
...
@@ -183,7 +187,7 @@ export default {
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"badge-link-url"
class=
"label-bold"
>
{{
s__
(
'
Badges|Link
'
)
}}
</label>
<label
for=
"badge-link-url"
class=
"label-bold"
>
{{
s__
(
'
Badges|Link
'
)
}}
</label>
<p
v-
html=
"helpText /* eslint-disable-line vue/no-v-html */
"
></p>
<p
v-
safe-html:
[$
options.safeHtmlConfig]=
"helpText
"
></p>
<input
<input
id=
"badge-link-url"
id=
"badge-link-url"
v-model=
"linkUrl"
v-model=
"linkUrl"
...
@@ -198,7 +202,7 @@ export default {
...
@@ -198,7 +202,7 @@ export default {
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"badge-image-url"
class=
"label-bold"
>
{{
s__
(
'
Badges|Badge image URL
'
)
}}
</label>
<label
for=
"badge-image-url"
class=
"label-bold"
>
{{
s__
(
'
Badges|Badge image URL
'
)
}}
</label>
<p
v-
html=
"helpText /* eslint-disable-line vue/no-v-html */
"
></p>
<p
v-
safe-html:
[$
options.safeHtmlConfig]=
"helpText
"
></p>
<input
<input
id=
"badge-image-url"
id=
"badge-image-url"
v-model=
"imageUrl"
v-model=
"imageUrl"
...
...
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