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
f7524126
Commit
f7524126
authored
Jul 25, 2019
by
Martin Hanzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rel noopener, noreferrer to links
parent
1ca6581d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/assets/javascripts/vue_shared/components/markdown/toolbar.vue
...ts/javascripts/vue_shared/components/markdown/toolbar.vue
+2
-2
app/views/shared/notes/_hints.html.haml
app/views/shared/notes/_hints.html.haml
+2
-2
No files found.
app/assets/javascripts/vue_shared/components/markdown/toolbar.vue
View file @
f7524126
...
...
@@ -24,8 +24,8 @@ export default {
},
computed
:
{
toolbarHelpHtml
()
{
const
mdLinkStart
=
`<a href="
${
this
.
markdownDocsPath
}
" target="_blank" tabindex="-1">`
;
const
actionsLinkStart
=
`<a href="
${
this
.
quickActionsDocsPath
}
" target="_blank" tabindex="-1">`
;
const
mdLinkStart
=
`<a href="
${
this
.
markdownDocsPath
}
" target="_blank"
rel="noopener noreferrer"
tabindex="-1">`
;
const
actionsLinkStart
=
`<a href="
${
this
.
quickActionsDocsPath
}
" target="_blank"
rel="noopener noreferrer"
tabindex="-1">`
;
const
linkEnd
=
'
</a>
'
;
if
(
this
.
markdownDocsPath
&&
!
this
.
quickActionsDocsPath
)
{
...
...
app/views/shared/notes/_hints.html.haml
View file @
f7524126
-
supports_quick_actions
=
local_assigns
.
fetch
(
:supports_quick_actions
,
false
)
.comment-toolbar.clearfix
.toolbar-text
-
md_link_start
=
'<a href="%{url}" target="_blank" tabindex="-1">'
.
html_safe
%
{
url:
help_page_path
(
'user/markdown'
)
}
-
actions_link_start
=
'<a href="%{url}" target="_blank" tabindex="-1">'
.
html_safe
%
{
url:
help_page_path
(
'user/project/quick_actions'
)
}
-
md_link_start
=
'<a href="%{url}" target="_blank"
rel="noopener noreferrer"
tabindex="-1">'
.
html_safe
%
{
url:
help_page_path
(
'user/markdown'
)
}
-
actions_link_start
=
'<a href="%{url}" target="_blank"
rel="noopener noreferrer"
tabindex="-1">'
.
html_safe
%
{
url:
help_page_path
(
'user/project/quick_actions'
)
}
-
link_end
=
'</a>'
.
html_safe
-
if
supports_quick_actions
=
s_
(
'Editor|%{mdLinkStart}Markdown%{mdLinkEnd} and %{actionsLinkStart}quick actions%{actionsLinkEnd} are supported'
).
html_safe
%
{
mdLinkStart:
md_link_start
,
mdLinkEnd:
link_end
,
actionsLinkStart:
actions_link_start
,
actionsLinkEnd:
link_end
}
...
...
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