<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Focus the Web Tech Blog &#187; cgi</title>
	<atom:link href="http://tech.focustheweb.com/tag/cgi/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.focustheweb.com</link>
	<description>Programmazione, web, internet, howtos, etc.</description>
	<lastBuildDate>Sat, 24 Apr 2010 09:16:53 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>URL escaping in Ruby con CGI::escape</title>
		<link>http://tech.focustheweb.com/programmazione/ruby-programmazione/url-escaping-in-ruby-con-cgiescape/</link>
		<comments>http://tech.focustheweb.com/programmazione/ruby-programmazione/url-escaping-in-ruby-con-cgiescape/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 10:49:04 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[escape]]></category>
		<category><![CDATA[rtf]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://tech.focustheweb.com/?p=322</guid>
		<description><![CDATA[







E&#8217; da un po&#8217; che non scrivo ed ecco un piccolo aggiornamento.
Parliamo di URLs e dei caratteri ammessi in questo tipo di oggetti. Il documento RFC 1738 del &#8216;94 prevede solo alcuni caratteri per l&#8217;identificazione di URLs:
only alphanumerics, the special characters &#8220;$-_.+!*&#8217;(),&#8221;, and reserved characters used for their reserved purposes may be used unencoded within [...]]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-7194529311513014";
/* 468x60, creato 21/11/09 */
google_ad_slot = "8123373738";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
<br />
E&#8217; da un po&#8217; che non scrivo ed ecco un piccolo aggiornamento.</p>
<p>Parliamo di URLs e dei caratteri ammessi in questo tipo di oggetti. Il documento <a title="RFC 1738" href="http://www.rfc-editor.org/rfc/rfc1738.txt">RFC 1738</a> del &#8216;94 prevede solo alcuni caratteri per l&#8217;identificazione di URLs:</p>
<blockquote><p>only alphanumerics, the special characters &#8220;$-_.+!*&#8217;(),&#8221;, and reserved characters used for their reserved purposes may be used unencoded within a URL.</p></blockquote>
<p>Per eseguire questa operazione di <em>escaping</em> Ruby offre una semplice funzione di libreria:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC00FF; font-weight:bold;">CGI</span>::escape</pre></div></div>

<p>Esempio:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">url_encoded_string = <span style="color:#CC00FF; font-weight:bold;">CGI</span>::escape<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;'Stop!' said Fred&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
     <span style="color:#008000; font-style:italic;"># =&gt; &quot;%27Stop%21%27+said+Fred&quot;</span></pre></div></div>

<p>Per maggiori informazioni:<br />
<a title="CGI::escape" href="http://ruby-doc.org/core/classes/CGI.html#M000532"> http://ruby-doc.org/core/classes/CGI.html#M000532</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/ruby-programmazione/url-escaping-in-ruby-con-cgiescape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
