Commit ea9d910c authored by Patricio Cano's avatar Patricio Cano

Refactor clone button sanitation to its own method to avoid duplication.

parent 82652013
......@@ -47,12 +47,16 @@ module ApplicationSettingsHelper
def enabled_project_tooltip(project, protocol)
case protocol
when 'ssh'
sanitize(ssh_clone_button(project), tags: %w(a), attributes: %w(id class title data-html data-container data-placement data-title data-original-title aria-describedby))
sanitize_clone_button(ssh_clone_button(project))
else
sanitize(http_clone_button(project), tags: %w(a), attributes: %w(id class title data-html data-container data-placement data-title data-original-title aria-describedby))
sanitize_clone_button(http_clone_button(project))
end
end
def sanitize_clone_button(input)
sanitize(input, tags: %w(a), attributes: %w(id class title data-html data-container data-placement data-title data-original-title aria-describedby))
end
# Return a group of checkboxes that use Bootstrap's button plugin for a
# toggle button effect.
def restricted_level_checkboxes(help_block_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment