<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Raymond Law: Sanitize your output in Ruby on Rails</title>
    <link>http://blog.rayvinly.com/articles/2008/10/30/sanitize-your-output-in-ruby-on-rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Sanitize your output in Ruby on Rails</title>
      <description>&lt;p&gt;We all know about the holy h() method that escapes your output when you do &amp;lt;&lt;span&gt;=h blah %&amp;gt;.  But how many of us can claim we remember to use it where it&amp;#8217;s appropriate during development 100&lt;/span&gt; of the time?  Can you swear you&amp;#8217;ve never missed one?  Moreover, it&amp;#8217;s such a mental distraction to think logic and h() at the same time.  And when you take over a Rails project in the middle, how can you ensure the previous developers use h()?&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s the rescue.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://github.com/pelargir/safe_erb"&gt;safe_erb&lt;/a&gt; + &lt;a href="http://github.com/drnic/rails-footnotes"&gt;footnotes&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I don&amp;#8217;t think I need to explain more.  Just use it and you will find all those places where you should sanitize your output with h(), sanitize(), and untaint(), ...etc.&lt;/p&gt;</description>
      <pubDate>Thu, 30 Oct 2008 14:37:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:2139fb2c-3adc-4a1c-9de8-56bf527e1f9a</guid>
      <author>Raymond Law</author>
      <link>http://blog.rayvinly.com/articles/2008/10/30/sanitize-your-output-in-ruby-on-rails</link>
      <category>Ruby on Rails</category>
      <category>Web 2.0</category>
      <category>ruby</category>
      <category>rails</category>
      <category>rubyonrails</category>
      <category>safe_erb</category>
      <category>footnotes</category>
      <category>sanitize</category>
      <trackback:ping>http://blog.rayvinly.com/articles/trackback/73</trackback:ping>
    </item>
  </channel>
</rss>
