diff options
| author | Alban Peignier | 2015-05-21 16:05:12 +0200 |
|---|---|---|
| committer | Alban Peignier | 2015-05-21 16:05:12 +0200 |
| commit | cc5733be2a55046e61da2107a2dc3e15a06c942f (patch) | |
| tree | ca71b902f947ecd3de5da02921c5231b339ec24e | |
| parent | 3ce316f104dfb4bda2a666a358ef195cc51c31bd (diff) | |
| download | chouette-core-cc5733be2a55046e61da2107a2dc3e15a06c942f.tar.bz2 | |
Strip html tags in TitleHelper
| -rw-r--r-- | app/helpers/title_helper.rb | 5 |
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 |
