Also fix bug where sources were not escaped at all on post versions page
This commit is contained in:
Toks
2014-03-10 22:34:22 -04:00
parent 983cc5534f
commit 424d84661a
2 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
module ApplicationHelper
def wordbreakify(string)
raw(string.gsub(/(.{10})/, "\\1<wbr>"))
lines = string.scan(/.{1,10}/)
wordbreaked_string = lines.map{|str| h(str)}.join("<wbr>")
raw(wordbreaked_string)
end
def nav_link_to(text, url, options = nil)