summaryrefslogtreecommitdiff
path: root/app/helpers/search_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-27 12:37:31 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-08-27 12:37:31 +0300
commit7e59a8fee8c89d6217bd48bf1050526f59cb96aa (patch)
tree1063fd0093bbcbbe4e38df6299adb2777f0884b3 /app/helpers/search_helper.rb
parent13f6dc1a9476ef2c86538ede8420e915eb999a1c (diff)
downloadgitlab-ce-7e59a8fee8c89d6217bd48bf1050526f59cb96aa.tar.gz
Improve comment search results
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index fff850c1fbb..51b6812cac3 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -103,4 +103,9 @@ module SearchHelper
options = exist_opts.merge(options)
search_path(options)
end
+
+ # Sanitize html generated after parsing markdown from issue description or comment
+ def search_md_sanitize(html)
+ sanitize(html, tags: %w(a p ul li pre code))
+ end
end