aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2015-05-21 16:05:12 +0200
committerAlban Peignier2015-05-21 16:05:12 +0200
commitcc5733be2a55046e61da2107a2dc3e15a06c942f (patch)
treeca71b902f947ecd3de5da02921c5231b339ec24e
parent3ce316f104dfb4bda2a666a358ef195cc51c31bd (diff)
downloadchouette-core-cc5733be2a55046e61da2107a2dc3e15a06c942f.tar.bz2
Strip html tags in TitleHelper
-rw-r--r--app/helpers/title_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/title_helper.rb b/app/helpers/title_helper.rb
index 209cbc4a9..26d107002 100644
--- a/app/helpers/title_helper.rb
+++ b/app/helpers/title_helper.rb
@@ -2,12 +2,13 @@ module TitleHelper
def title(title = nil)
if title
- @title = title
+ @title = strip_tags(title)
+ title
else
@title
end
end
-
+
def title_tag(title, options = nil)
content_tag :h2, title(title).html_safe, options
end