<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://united-coders.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>united-coders.com - HTML</title>
 <link>http://united-coders.com/taxonomy/term/98/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>The art of escaping</title>
 <link>http://united-coders.com/matthias-reuter/the-art-of-escaping</link>
 <description>&lt;p&gt;Escaping is the art of transforming a text into a transport format from which it can be extracted again without any modification.&lt;/p&gt;
&lt;p&gt;That&#039;s something every developer does - to a certain level. For example take the sentence&lt;/p&gt;
&lt;blockquote&gt;&lt;div class=&quot;quote_start&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;quote_end&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Matthias says: &amp;quot;I love Javascript&amp;quot;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Now put this sentence in a Java source code:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;java geshifilter-java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #003399;&quot;&gt;String&lt;/span&gt; s &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;Matthias says: &amp;quot;&lt;/span&gt;I love Javascript&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;.&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;If you don&#039;t complain about this, your compiler will. In Java (any many other programming languages) the quotation mark &amp;quot; has a special meaning, it defines a string. So if you have a string containing the quotation mark, you need to escape it:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;java geshifilter-java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #003399;&quot;&gt;String&lt;/span&gt; s &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;Matthias says: &lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&amp;quot;&lt;/span&gt;I love Javascript&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&amp;quot;&lt;/span&gt;.&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;If you print out s, the original text is shown:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;java geshifilter-java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #003399;&quot;&gt;System&lt;/span&gt;.&lt;span style=&quot;color: #006633;&quot;&gt;out&lt;/span&gt;.&lt;span style=&quot;color: #006633;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;s&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Matthias says: &amp;quot;I love Javascript&amp;quot;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;/matthias-reuter/the-art-of-escaping&quot;&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;&gt;
&lt;rdf:Description rdf:about=&quot;http://united-coders.com/matthias-reuter/the-art-of-escaping&quot; dc:identifier=&quot;http://united-coders.com/matthias-reuter/the-art-of-escaping&quot; dc:title=&quot;The art of escaping&quot; trackback:ping=&quot;http://united-coders.com/trackback/41&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
&lt;div class=&#039;sexybookmarks-default-3306&#039;&gt;&lt;/div&gt;</description>
 <comments>http://united-coders.com/matthias-reuter/the-art-of-escaping#comments</comments>
 <category domain="http://united-coders.com/category/tags/escaping">escaping</category>
 <category domain="http://united-coders.com/category/tags/html">HTML</category>
 <category domain="http://united-coders.com/category/tags/java">java</category>
 <category domain="http://united-coders.com/category/tags/json">JSON</category>
 <category domain="http://united-coders.com/category/tags/php">php</category>
 <category domain="http://united-coders.com/category/tags/sql">SQL</category>
 <category domain="http://united-coders.com/category/tags/url">URL</category>
 <pubDate>Fri, 27 Nov 2009 08:47:49 +0000</pubDate>
 <dc:creator>Matthias Reuter</dc:creator>
 <guid isPermaLink="false">41 at http://united-coders.com</guid>
</item>
</channel>
</rss>


