[fix #1014] strip html tags in annotations_privees
This commit is contained in:
parent
6e97209b82
commit
a05217b364
3 changed files with 32 additions and 1 deletions
10
app/helpers/html_to_string_helper.rb
Normal file
10
app/helpers/html_to_string_helper.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
module HtmlToStringHelper
|
||||
def html_to_string(html)
|
||||
string_with_tags = html
|
||||
.gsub(/<br[ ]?[\/]?>/, "\n")
|
||||
.gsub('</p>', "\n")
|
||||
.gsub('<p>', '')
|
||||
|
||||
strip_tags(string_with_tags)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue