<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by João Fagundes on Medium]]></title>
        <description><![CDATA[Stories by João Fagundes on Medium]]></description>
        <link>https://medium.com/@joaovictordmf?source=rss-c12fbb70f2d0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*cUB97z5DDbBlivdpRnayBw.jpeg</url>
            <title>Stories by João Fagundes on Medium</title>
            <link>https://medium.com/@joaovictordmf?source=rss-c12fbb70f2d0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 02:35:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joaovictordmf/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A pretty way to unescape HTML in a Ruby on Rails application]]></title>
            <link>https://medium.com/sumone-technical-blog/a-pretty-way-to-unescape-html-in-a-ruby-on-rails-application-efc22b850027?source=rss-c12fbb70f2d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/efc22b850027</guid>
            <category><![CDATA[embedded-ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[João Fagundes]]></dc:creator>
            <pubDate>Wed, 31 Jul 2019 18:04:53 GMT</pubDate>
            <atom:updated>2019-07-31T18:15:28.188Z</atom:updated>
            <content:encoded><![CDATA[<p>I once sent a Pull Request to our code base here at Zygo containing an <em>.erb</em> tag with an unfamiliar alias. It was the &lt;%=<strong>=</strong> (...) %&gt; tag alias. I received a <em>request changes </em>on my PR asking if it wasn&#39;t a typo. A few months later, another coworker also thought it was a typo and removed the second <em>equals</em>, just to find out it broke our code.</p><p>It happens that is very hard to find any internet material, except for comments in <a href="https://stackoverflow.com/questions/4251284/raw-vs-html-safe-vs-h-to-unescape-html">already existing Stack Overflow questions</a>, that explains that this, actually, is an alias for the .html_safe command, used to unescape HTML code inside an <em>.erb</em> file.</p><pre>@custom_page_title = “Page &lt;strong&gt;Title&lt;/strong&gt;” <br>… <br>&lt;div&gt; <br>  &lt;h1&gt;&lt;%== @custom_page_title %&gt;&lt;/h1&gt; <br>&lt;/div&gt;</pre><p>Another very common way to achieve the same goal is calling the <strong>raw</strong> method, as in &lt;%= raw(...) %&gt;, but both .html_safe and raw(...) make your code look like a careless beach: ugly to see and painful to walk through</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RabaoJeiSmPmDBlPiZs8RA.jpeg" /><figcaption>What your code looks like before and after using aliases</figcaption></figure><p>Joining the lack of documentation about this alias with the unfamiliarity of our engineering team with it, we thought that maybe there are others Ruby on Rails developers missing out on this information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efc22b850027" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sumone-technical-blog/a-pretty-way-to-unescape-html-in-a-ruby-on-rails-application-efc22b850027">A pretty way to unescape HTML in a Ruby on Rails application</a> was originally published in <a href="https://medium.com/sumone-technical-blog">Zygo Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>