summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/ci/variables/_content.html.haml2
-rw-r--r--app/views/clusters/clusters/_advanced_settings.html.haml4
-rw-r--r--app/views/devise/registrations/new.html.haml2
-rw-r--r--app/views/doorkeeper/applications/_form.html.haml2
-rw-r--r--app/views/doorkeeper/authorizations/new.html.haml2
-rw-r--r--app/views/help/instance_configuration/_ssh_info.html.haml2
-rw-r--r--app/views/help/ui.html.haml524
-rw-r--r--app/views/projects/blob/_editor.html.haml3
-rw-r--r--app/views/registrations/welcome.html.haml2
-rw-r--r--app/views/shared/_delete_label_modal.html.haml2
-rw-r--r--app/views/shared/notes/_notes_with_form.html.haml2
-rw-r--r--app/views/shared/snippets/_form.html.haml3
-rw-r--r--app/views/shared/wikis/_form.html.haml2
-rw-r--r--app/views/users/calendar_activities.html.haml2
14 files changed, 16 insertions, 538 deletions
diff --git a/app/views/ci/variables/_content.html.haml b/app/views/ci/variables/_content.html.haml
index 144d13565b2..60106e8c530 100644
--- a/app/views/ci/variables/_content.html.haml
+++ b/app/views/ci/variables/_content.html.haml
@@ -1,3 +1,3 @@
= _('Environment variables are applied to environments via the runner. They can be protected by only exposing them to protected branches or tags. Additionally, they can be masked so they are hidden in job logs, though they must match certain regexp requirements to do so. You can use environment variables for passwords, secret keys, or whatever you want.')
-= _('You may also add variables that are made available to the running application by prepending the variable key with <code>K8S_SECRET_</code>.').html_safe
+= html_escape(_('You may also add variables that are made available to the running application by prepending the variable key with %{k8s_secret}.')) % { k8s_secret: tag.code('K8S_SECRET_') }
= link_to _('More information'), help_page_path('ci/variables/README', anchor: 'custom-environment-variables')
diff --git a/app/views/clusters/clusters/_advanced_settings.html.haml b/app/views/clusters/clusters/_advanced_settings.html.haml
index 5e88bb75a7a..117bdbc06a1 100644
--- a/app/views/clusters/clusters/_advanced_settings.html.haml
+++ b/app/views/clusters/clusters/_advanced_settings.html.haml
@@ -11,7 +11,7 @@
= @cluster.provider_label
%p
- provider_link = link_to(@cluster.provider_label, @cluster.provider_management_url, target: '_blank', rel: 'noopener noreferrer')
- = s_('ClusterIntegration|Manage your Kubernetes cluster by visiting %{provider_link}').html_safe % { provider_link: provider_link }
+ = html_escape(s_('ClusterIntegration|Manage your Kubernetes cluster by visiting %{provider_link}')) % { provider_link: provider_link }
.sub-section.form-group
= form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster, html: { class: 'cluster_management_form' } do |field|
@@ -22,7 +22,7 @@
= project_select_tag('cluster[management_project_id]', class: 'hidden-filter-value', toggle_class: 'js-project-search js-project-filter js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit',
placeholder: _('Select project'), idAttribute: 'id', data: { order_by: 'last_activity_at', idattribute: 'id', simple_filter: true, allow_clear: true, include_groups: false, include_projects_in_subgroups: true, group_id: group_id, user_id: user_id }, value: @cluster.management_project_id)
.text-muted
- = s_('ClusterIntegration|A cluster management project can be used to run deployment jobs with Kubernetes <code>cluster-admin</code> privileges.').html_safe
+ = html_escape(s_('ClusterIntegration|A cluster management project can be used to run deployment jobs with Kubernetes %{code_open}cluster-admin%{code_close} privileges.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
= link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank'
.gl-display-flex.gl-justify-content-end
= field.submit _('Save changes'), class: 'btn btn-success'
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index fb00e1b4384..afdf3c38567 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -3,7 +3,7 @@
.row
.col-lg-7
%h1.mb-3.font-weight-bold.text-6.mt-0
- = _("Speed up your DevOps<br>with GitLab").html_safe
+ = html_escape(_("Speed up your DevOps%{br_tag}with GitLab")) % { br_tag: '<br/>'.html_safe }
%p.text-3
= _("GitLab is a single application for the entire software development lifecycle. From project planning and source code management to CI/CD, monitoring, and security.")
.col-lg-5.order-12
diff --git a/app/views/doorkeeper/applications/_form.html.haml b/app/views/doorkeeper/applications/_form.html.haml
index d74cba984e8..7fbaa35d1d5 100644
--- a/app/views/doorkeeper/applications/_form.html.haml
+++ b/app/views/doorkeeper/applications/_form.html.haml
@@ -13,7 +13,7 @@
= _('Use one line per URI')
- if Doorkeeper.configuration.native_redirect_uri
%span.form-text.text-muted
- = _('Use <code>%{native_redirect_uri}</code> for local tests').html_safe % { native_redirect_uri: Doorkeeper.configuration.native_redirect_uri }
+ = html_escape(_('Use %{native_redirect_uri} for local tests')) % { native_redirect_uri: tag.code(Doorkeeper.configuration.native_redirect_uri) }
.form-group.form-check
= f.check_box :confidential, class: 'form-check-input'
diff --git a/app/views/doorkeeper/authorizations/new.html.haml b/app/views/doorkeeper/authorizations/new.html.haml
index 70abc1a267a..62e66486a3e 100644
--- a/app/views/doorkeeper/authorizations/new.html.haml
+++ b/app/views/doorkeeper/authorizations/new.html.haml
@@ -11,7 +11,7 @@
.text-warning
%p
= icon("exclamation-triangle fw")
- = _('You are an admin, which means granting access to <strong>%{client_name}</strong> will allow them to interact with GitLab as an admin as well. Proceed with caution.').html_safe % { client_name: @pre_auth.client.name }
+ = html_escape(_('You are an admin, which means granting access to %{client_name} will allow them to interact with GitLab as an admin as well. Proceed with caution.')) % { client_name: tag.strong(@pre_auth.client.name) }
%p
- link_to_client = link_to(@pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer')
= _("An application called %{link_to_client} is requesting access to your GitLab account.").html_safe % { link_to_client: link_to_client }
diff --git a/app/views/help/instance_configuration/_ssh_info.html.haml b/app/views/help/instance_configuration/_ssh_info.html.haml
index a7ee37b2784..2c6ada4d3f2 100644
--- a/app/views/help/instance_configuration/_ssh_info.html.haml
+++ b/app/views/help/instance_configuration/_ssh_info.html.haml
@@ -9,7 +9,7 @@
- if ssh_info.blank?
%p
- = _('SSH host keys are not available on this system. Please use <code>ssh-keyscan</code> command or contact your GitLab administrator for more information.').html_safe
+ = html_escape(_('SSH host keys are not available on this system. Please use %{ssh_keyscan} command or contact your GitLab administrator for more information.')) % { ssh_keyscan: tag.code('ssh-keyscan') }
- else
%p
= _('Below are the fingerprints for the current instance SSH host keys.')
diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml
deleted file mode 100644
index b34ca5abb65..00000000000
--- a/app/views/help/ui.html.haml
+++ /dev/null
@@ -1,524 +0,0 @@
-- page_title _("UI Development Kit"), _("Help")
-- lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fermentum nisi sapien, non consequat lectus aliquam ultrices. Suspendisse sodales est euismod nunc condimentum, a consectetur diam ornare."
-- link_classes = "flex-grow-1 mx-1 "
-
-.gitlab-ui-dev-kit
- %h1 GitLab UI development kit
- %p.light
- Use page inspector in your browser to check element classes and structure
- of examples below.
- %hr
- %ul
- %li
- = link_to 'Blocks', '#blocks'
- %li
- = link_to 'Lists', '#lists'
- %li
- = link_to 'Tables', '#tables'
- %li
- = link_to 'Nav', '#nav'
- %li
- = link_to 'Buttons', '#buttons'
- %li
- = link_to 'Dropdowns', '#dropdowns'
- %li
- = link_to 'Panels', '#panels'
- %li
- = link_to 'Alerts', '#alerts'
- %li
- = link_to 'Forms', '#forms'
- %li
- = link_to 'Files', '#file'
- %li
- = link_to 'Markdown', '#markdown'
-
- %h2#blocks Blocks
-
- .lead
- Content block separated with botton border
- %code .content-block
-
- .example
- .content-block
- %h4 Normal block inside content
- = lorem
-
- .content-block
- %h4 Second block
- = lorem
-
- .lead
- Gray content block with side padding using
- %code .row-content-block
-
- .example
- .row-content-block
- %h4 Normal block inside content
- = lorem
-
- .row-content-block.second-block
- %h4 Second block
- = lorem
-
-
- .lead
- Cover block for profile page with avatar, name and description
- %code .cover-block
- .example
- .cover-block.user-cover-block
- = render layout: 'users/cover_controls' do
- = link_to '#', class: link_classes + 'btn btn-default' do
- = sprite_icon('pencil')
- = link_to '#', class: link_classes + 'btn btn-svg btn-default' do
- = sprite_icon('rss', css_class: 'qa-rss-icon', size: 16)
- .avatar-holder
- = image_tag avatar_icon_for_email('admin@example.com', 90), class: "avatar s90", alt: ''
- .cover-title
- John Smith
-
- .cover-desc.cgray
- = lorem
-
- %h2#lists Lists
-
- .lead
- Simple list using
- %code .content-list
-
- .example
- %ul.content-list
- %li
- One item
- %li
- One item
- %li
- One item
-
- .lead
- List with avatar, title and description using
- %code .content-list
-
- .example
- %ul.content-list
- %li
- = image_tag 'no_avatar.png', class: 'avatar s40'
- .title Title
- .description Description
- %li
- = image_tag 'no_avatar.png', class: 'avatar s40'
- .title Title
- .description Description
- %li
- = image_tag 'no_avatar.png', class: 'avatar s40'
- .title Title
- .description Description
-
- .lead
- List with hover effect
- %code .hover-list
- .example
- %ul.hover-list
- %li
- One item
- %li
- One item
- %li
- One item
-
- .lead
- List inside panel
- .example
- .card
- .card-header Your list
- %ul.content-list
- %li
- One item
- %li
- One item
- %li
- One item
-
- %h2#tables Tables
-
- .example
- %table.table
- %thead
- %tr
- %th #
- %th First Name
- %th Last Name
- %th Username
- %tbody
- %tr
- %td 1
- %td Mark
- %td Otto
- %td @mdo
- %tr
- %td 2
- %td Jacob
- %td Thornton
- %td @fat
- %tr
- %td 3
- %td Larry
- %td the Bird
- %td @twitter
-
- %h2#navs Navigation
-
- .lead
- Holder for top page navigation. Includes navigation, search field, sorting and button
- %code .top-area
-
- .example
- .top-area
- %ul.nav-links.nav.nav-tabs
- %li.active
- %a Open
- %li
- %a Closed
- .nav-controls
- = text_field_tag 'sample', nil, class: 'form-control'
- .dropdown
- %button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
- %span Sort by name
- = icon('chevron-down')
- %ul.dropdown-menu
- %li
- = link_to 'Sort by date', '#'
-
- = link_to 'New issue', '#', class: 'btn btn-success btn-inverted'
-
- .lead
- Only nav links without button and search
- %code .nav-links
- .example
- %ul.nav-links
- %li.active
- %a Open
- %li
- %a Closed
-
-
- %h2#buttons Buttons
-
- .example
- %button.btn.btn-default{ :type => "button" } Secondary
- %button.btn.btn-primary{ :type => "button" } Primary
- %button.btn.btn-success{ :type => "button" } Success
- %button.btn.btn-info{ :type => "button" } Info
- %button.btn.btn-warning{ :type => "button" } Warning
- %button.btn.btn-danger{ :type => "button" } Danger
- %button.btn.btn-link{ :type => "button" } Link
-
- %h2#dropdowns Dropdowns
-
- .example
- .clearfix
- .dropdown.inline.float-left
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
- Dropdown
- = icon('chevron-down')
- %ul.dropdown-menu
- %li
- %a{ href: "#" }
- Dropdown option
- .dropdown.inline.float-right
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
- Dropdown
- = icon('chevron-down')
- %ul.dropdown-menu.dropdown-menu-right
- %li
- %a{ href: "#" }
- Dropdown option
- .example
- %div
- .dropdown.inline
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
- Dropdown
- = icon('chevron-down')
- %ul.dropdown-menu.dropdown-menu-selectable
- %li
- %a.is-active{ href: "#" }
- Dropdown option
- .example
- %div
- .dropdown.inline
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
- Dropdown
- = icon('chevron-down')
- .dropdown-menu.dropdown-select.dropdown-menu-selectable
- .dropdown-title
- %span Dropdown title
- %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
- = icon('times')
- .dropdown-input
- %input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
- = icon('search')
- .dropdown-content
- %ul
- %li
- %a.is-active{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- %li.divider
- %li
- %a{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- .dropdown-footer
- %strong Tip:
- If an author is not a member of this project, you can still filter by their name while using the search field.
- .dropdown.inline
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
- Dropdown loading
- = icon('chevron-down')
- .dropdown-menu.dropdown-select.dropdown-menu-selectable.is-loading
- .dropdown-title
- %span Dropdown title
- %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
- = icon('times')
- .dropdown-input
- %input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
- = icon('search')
- .dropdown-content
- %ul
- %li
- %a.is-active{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- %li.divider
- %li
- %a{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- %li
- %a{ href: "#" }
- Dropdown option
- .dropdown-footer
- %strong Tip:
- If an author is not a member of this project, you can still filter by their name while using the search field.
- .dropdown-loading.text-center
- .spinner.spinner-md.mt-8
-
- .example
- %div
- .dropdown.inline
- %button.dropdown-menu-toggle{ type: 'button', data: {toggle: 'dropdown' } }
- Dropdown user
- = icon('chevron-down')
- .dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-user
- .dropdown-title
- %span Dropdown title
- %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
- = icon('times')
- .dropdown-input
- %input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
- = icon('search')
- .dropdown-content
- %ul
- %li
- %a.dropdown-menu-user-link.is-active{ href: "#" }
- = link_to_member_avatar(@user, size: 30)
- %strong.dropdown-menu-user-full-name
- = @user.name
- .dropdown-menu-user-username
- = @user.to_reference
-
- .example
- %div
- .dropdown.inline
- %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
- Dropdown page 2
- = icon('chevron-down')
- .dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-user.dropdown-menu-paging.is-page-two
- .dropdown-page-one
- .dropdown-title
- %button.dropdown-title-button.dropdown-menu-back{ aria: { label: "Go back" } }
- = icon('arrow-left')
- %span Dropdown title
- %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
- = icon('times')
- .dropdown-input
- %input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
- = icon('search')
- .dropdown-content
- %ul
- %li
- %a.dropdown-menu-user-link.is-active{ href: "#" }
- = link_to_member_avatar(@user, size: 30)
- %strong.dropdown-menu-user-full-name
- = @user.name
- .dropdown-menu-user-username
- = @user.to_reference
- .dropdown-page-two
- .dropdown-title
- %button.dropdown-title-button.dropdown-menu-back{ aria: { label: "Go back" } }
- = icon('arrow-left')
- %span Create label
- %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
- = icon('times')
- .dropdown-input
- %input.dropdown-input-field{ type: "search", placeholder: "Name new label" }
- .dropdown-content
- %button.btn.btn-primary
- Create
-
- .example
- %div
- .dropdown.inline
- %button#js-project-dropdown.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
- Projects
- = icon('chevron-down')
- .dropdown-menu.dropdown-select.dropdown-menu-selectable
- .dropdown-title
- %span Go to project
- %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
- = icon('times')
- .dropdown-input
- %input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
- = icon('search')
- .dropdown-content
- .dropdown-loading.text-center
- .spinner.spinner-md.mt-8
-
- .example
- %div
- = dropdown_tag("Projects", options: { title: "Go to project", filter: true, placeholder: "Filter projects" })
-
- %h2#panels Panels
-
- .row
- .col-md-6
- .card.bg-success
- .card-header Success
- .card-body
- = lorem
- .card.bg-primary
- .card-header Primary
- .card-body
- = lorem
- .card.bg-info
- .card-header Info
- .card-body
- = lorem
- .col-md-6
- .card.bg-warning
- .card-header Warning
- .card-body
- = lorem
- .card.bg-danger
- .card-header Danger
- .card-body
- = lorem
-
- %h2#alerts Alerts
-
- .row
- .col-md-6
- .alert.alert-success
- = lorem
- .alert.alert-info
- = lorem
- .col-md-6
- .alert.alert-warning
- = lorem
- .alert.alert-danger
- = lorem
-
- %h2#forms Forms
-
- .lead
- Horizontal form when label rendered inline with input
- %code form.horizontal-form
-
- .example
- %form
- .form-group.row
- %label.col-sm-2.col-form-label{ :for => "inputEmail3" } Email
- .col-sm-10
- %input#inputEmail3.form-control{ :placeholder => "Email", :type => "email" }/
- .form-group.row
- %label.col-sm-2.col-form-label{ :for => "inputPassword3" } Password
- .col-sm-10
- %input#inputPassword3.form-control{ :placeholder => "Password", :type => "password" }/
- .form-group.row
- .offset-sm-2.col-sm-10
- .form-check
- %input.form-check-input{ :type => "checkbox" }/
- %label.form-check-label
- Remember me
- .form-group.row
- .offset-sm-2.col-sm-10
- %button.btn.btn-default{ :type => "submit" } Sign in
-
- .lead
- Form when label rendered above input
- %code form
-
- .example
- %form
- .form-group
- %label{ :for => "exampleInputEmail1" } Email address
- %input#exampleInputEmail1.form-control{ :placeholder => "Enter email", :type => "email" }/
- .form-group
- %label{ :for => "exampleInputPassword1" } Password
- %input#exampleInputPassword1.form-control{ :placeholder => "Password", :type => "password" }/
- .form-check
- %input.form-check-input{ :type => "checkbox" }/
- %label.form-check-label
- Remember me
- %button.btn.btn-default{ :type => "submit" } Sign in
-
- %h2#file File
- %h4
- %code .file-holder
-
- - blob = Snippet.new(content: "Wow\nSuch\nFile").blob
- .example
- .file-holder
- .js-file-title.file-title
- Awesome file
- .file-actions
- .btn-group
- %a.btn Edit
- %a.btn.btn-danger Remove
- = render 'shared/file_highlight', blob: blob
-
- %h2#markdown Markdown
- %h4
- %code .md
-
- Markdown rendering has a bit different css and presented in next UI elements:
-
- %ul
- %li comment
- %li issue, merge request description
- %li wiki page
- %li help page
-
- You can check how markdown rendered at #{link_to 'Markdown help page', help_page_path("user/markdown")}.
diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml
index 0924e9a35f5..787dc3b030f 100644
--- a/app/views/projects/blob/_editor.html.haml
+++ b/app/views/projects/blob/_editor.html.haml
@@ -40,7 +40,8 @@
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2', tabindex: '-1'
.file-editor.code
- %pre.js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }= params[:content] || local_assigns[:blob_data]
+ .js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }<
+ %pre.editor-loading-content= params[:content] || local_assigns[:blob_data]
- if local_assigns[:path]
.js-edit-mode-pane#preview.hide
.center
diff --git a/app/views/registrations/welcome.html.haml b/app/views/registrations/welcome.html.haml
index bc8d7ed10ef..ef3e0b1b4c0 100644
--- a/app/views/registrations/welcome.html.haml
+++ b/app/views/registrations/welcome.html.haml
@@ -1,6 +1,6 @@
- content_for(:page_title, _('Welcome to GitLab %{name}!') % { name: current_user.name })
.text-center.mb-3
- = _('In order to tailor your experience with GitLab we<br>would like to know a bit more about you.').html_safe
+ = html_escape(_('In order to tailor your experience with GitLab we%{br_tag}would like to know a bit more about you.')) % { br_tag: '<br/>'.html_safe }
.signup-box.p-3.mb-2
.signup-body
= form_for(current_user, url: users_sign_up_update_registration_path, html: { class: 'new_new_user gl-show-field-errors', 'aria-live' => 'assertive' }) do |f|
diff --git a/app/views/shared/_delete_label_modal.html.haml b/app/views/shared/_delete_label_modal.html.haml
index 25c841d2344..ffc34ff34c3 100644
--- a/app/views/shared/_delete_label_modal.html.haml
+++ b/app/views/shared/_delete_label_modal.html.haml
@@ -8,7 +8,7 @@
.modal-body
%p
- = _('<strong>%{label_name}</strong> <span>will be permanently deleted from %{subject_name}. This cannot be undone.</span>').html_safe % { label_name: label.name, subject_name: label.subject_name }
+ = html_escape(_('%{label_name} %{span_open}will be permanently deleted from %{subject_name}. This cannot be undone.%{span_close}')) % { label_name: tag.strong(label.name), subject_name: label.subject_name, span_open: '<span>'.html_safe, span_close: '</span>'.html_safe }
.modal-footer
%a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' }= _('Cancel')
diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml
index fa103ad447a..f712b139c57 100644
--- a/app/views/shared/notes/_notes_with_form.html.haml
+++ b/app/views/shared/notes/_notes_with_form.html.haml
@@ -27,6 +27,6 @@
%span.issuable-note-warning
= sprite_icon('lock', size: 16, css_class: 'icon')
%span
- = _("This %{issuable} is locked. Only <strong>project members</strong> can comment.").html_safe % { issuable: issuable.class.to_s.titleize.downcase }
+ = html_escape(_("This %{issuable} is locked. Only %{strong_open}project members%{strong_close} can comment.")) % { issuable: issuable.class.to_s.titleize.downcase, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
-# haml-lint:disable InlineJavaScript
%script.js-notes-data{ type: "application/json" }= initial_notes_data(autocomplete).to_json.html_safe
diff --git a/app/views/shared/snippets/_form.html.haml b/app/views/shared/snippets/_form.html.haml
index 7f307f33b51..81277b50d13 100644
--- a/app/views/shared/snippets/_form.html.haml
+++ b/app/views/shared/snippets/_form.html.haml
@@ -29,7 +29,8 @@
.js-file-title.file-title-flex-parent
= f.text_field :file_name, placeholder: s_("Snippets|Give your file a name to add code highlighting, e.g. example.rb for Ruby"), class: 'form-control js-snippet-file-name', data: { qa_selector: 'file_name_field' }
.file-content.code
- %pre#editor{ data: { 'editor-loading': true } }= @snippet.content
+ #editor{ data: { 'editor-loading': true } }<
+ %pre.editor-loading-content= @snippet.content
= f.hidden_field :content, class: 'snippet-file-content'
.form-group
diff --git a/app/views/shared/wikis/_form.html.haml b/app/views/shared/wikis/_form.html.haml
index 92b9207aaa4..4d64521f9b0 100644
--- a/app/views/shared/wikis/_form.html.haml
+++ b/app/views/shared/wikis/_form.html.haml
@@ -59,7 +59,7 @@
- link_example = '[[page-slug]]'
- else
- link_example = '[Link Title](page-slug)'
- = (s_('WikiMarkdownTip|To link to a (new) page, simply type <code class="js-markup-link-example">%{link_example}</code>') % { link_example: link_example }).html_safe
+ = html_escape(s_('WikiMarkdownTip|To link to a (new) page, simply type %{link_example}')) % { link_example: tag.code(link_example, class: 'js-markup-link-example') }
= succeed '.' do
- markdown_link = link_to s_("WikiMarkdownDocs|documentation"), help_page_path('user/markdown', anchor: 'wiki-specific-markdown')
= (s_("WikiMarkdownDocs|More examples are in the %{docs_link}") % { docs_link: markdown_link }).html_safe
diff --git a/app/views/users/calendar_activities.html.haml b/app/views/users/calendar_activities.html.haml
index a0dc7580757..111f7e169b9 100644
--- a/app/views/users/calendar_activities.html.haml
+++ b/app/views/users/calendar_activities.html.haml
@@ -1,5 +1,5 @@
%h4.prepend-top-20
- = _("Contributions for <strong>%{calendar_date}</strong>").html_safe % { calendar_date: @calendar_date.to_s(:medium) }
+ = html_escape(_("Contributions for %{calendar_date}")) % { calendar_date: tag.strong(@calendar_date.to_s(:medium)) }
- if @events.any?
%ul.bordered-list