projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
17445a4
)
Sanitize any user supplied HTML before doing link detection or the
author
Tom Hughes
<tom@compton.nu>
Sat, 14 Nov 2009 16:31:51 +0000
(16:31 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sat, 14 Nov 2009 16:31:51 +0000
(16:31 +0000)
sanitizer will strip the rel=nofollow attributes.
app/helpers/application_helper.rb
patch
|
blob
|
history
diff --git
a/app/helpers/application_helper.rb
b/app/helpers/application_helper.rb
index 2eebec1708378663a5bc4f67ad828ec5dd847da9..e10650ada1fa3cde95956725f5e679f146446156 100644
(file)
--- a/
app/helpers/application_helper.rb
+++ b/
app/helpers/application_helper.rb
@@
-1,6
+1,6
@@
module ApplicationHelper
def htmlize(text)
- return
sanitize(auto_link(simple_format(text), :link => :urls, :html => { :rel => "nofollow" })
)
+ return
auto_link(sanitize(simple_format(text)), :link => :urls, :html => { :rel => "nofollow" }
)
end
def html_escape_unicode(text)