diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-25 13:16:33 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-25 13:16:33 +0100 |
commit | 7dedd997b910f65ee3c494d906fbc2392962c114 (patch) | |
tree | 4ff6c88677c75cd366d58c9bd1f2d11f0739bfd5 /lib/banzai | |
parent | ef8b1dbf21a90f719c2e8b8c052e16f6107193c6 (diff) | |
parent | ed777c7bcc990e5e3ff9f8e0d28a1e23af44d8f1 (diff) | |
download | gitlab-ce-7dedd997b910f65ee3c494d906fbc2392962c114.tar.gz |
Merge branch 'master' into milestone-ref
Diffstat (limited to 'lib/banzai')
-rw-r--r-- | lib/banzai/filter/external_issue_reference_filter.rb | 6 | ||||
-rw-r--r-- | lib/banzai/filter/label_reference_filter.rb | 2 | ||||
-rw-r--r-- | lib/banzai/filter/user_reference_filter.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/banzai/filter/external_issue_reference_filter.rb b/lib/banzai/filter/external_issue_reference_filter.rb index f5942740cd6..6136e73c096 100644 --- a/lib/banzai/filter/external_issue_reference_filter.rb +++ b/lib/banzai/filter/external_issue_reference_filter.rb @@ -63,15 +63,15 @@ module Banzai url = url_for_issue(id, project, only_path: context[:only_path]) - title = escape_once("Issue in #{project.external_issue_tracker.title}") + title = "Issue in #{project.external_issue_tracker.title}" klass = reference_class(:issue) data = data_attribute(project: project.id, external_issue: id) text = link_text || match %(<a href="#{url}" #{data} - title="#{title}" - class="#{klass}">#{text}</a>) + title="#{escape_once(title)}" + class="#{klass}">#{escape_once(text)}</a>) end end diff --git a/lib/banzai/filter/label_reference_filter.rb b/lib/banzai/filter/label_reference_filter.rb index 07bac2dd7fd..a3a7a23c1e6 100644 --- a/lib/banzai/filter/label_reference_filter.rb +++ b/lib/banzai/filter/label_reference_filter.rb @@ -60,7 +60,7 @@ module Banzai text = link_text || render_colored_label(label) %(<a href="#{url}" #{data} - class="#{klass}">#{text}</a>) + class="#{klass}">#{escape_once(text)}</a>) else match end diff --git a/lib/banzai/filter/user_reference_filter.rb b/lib/banzai/filter/user_reference_filter.rb index 67c24faf991..7f302d51dd7 100644 --- a/lib/banzai/filter/user_reference_filter.rb +++ b/lib/banzai/filter/user_reference_filter.rb @@ -122,7 +122,7 @@ module Banzai end def link_tag(url, data, text) - %(<a href="#{url}" #{data} class="#{link_class}">#{text}</a>) + %(<a href="#{url}" #{data} class="#{link_class}">#{escape_once(text)}</a>) end end end |