· 1 min read

Screencast: Schutz vor XSS in Rails 3

Download:

Download (15.7 MB, 8:56) alternative download for iPod & Apple TV (11.1 MB, 8:56)

Resourcen:

Quellcode:

[html]

<%= strong link_to(comment.name, comment.url) %>

<%= comment.content %>

[/html]

[ruby] # rails “foo”.html_safe? safe = “safe”.html_safe safe.html_safe?

# application_helper.rb def strong(content) ”#{h(content)}“.html_safe end [/ruby]

Back to Blog