<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,6 +5,7 @@
 
 $version = '0.1'
 require 'open-uri'
+require &quot;uri&quot;
 
 username_file = ENV[&quot;HOME&quot;] + '/.twitter/username'
 password_file = ENV[&quot;HOME&quot;] + '/.twitter/password'
@@ -39,7 +40,7 @@ if ARGV[1]
   title = ARGV[1]
 else  
   html = open(ARGV[0]).read
-  html =~ /&lt;\s*title\s*&gt;(.+?)&lt;\/title\s*&gt;/im 
+  html =~ /&lt;\s*title.*?&gt;(.+?)&lt;\/title\s*&gt;/im 
   if $1
     title = $1.strip.gsub(&quot;\n&quot;, &quot;&quot;).gsub(/\s{2,}/, '')
   else
@@ -52,7 +53,9 @@ if title.length &gt; 116
 	title = title[0, 115] + &quot;&#8230;&quot;
 end
 
-status = &quot;#{title} &#9755; #{open(&quot;http://awbox.com/new?url=#{ARGV[0]}&quot;).read}&quot;
+url = URI.escape(ARGV[0], Regexp.new(&quot;[^#{URI::PATTERN::UNRESERVED}]&quot;))
+
+status = &quot;#{title} &#9755; #{open(&quot;http://awbox.com/new?url=#{url}&quot;).read}&quot;
 
 url = URI.parse('http://twitter.com/statuses/update.xml')
 req = Net::HTTP::Post.new(url.path)</diff>
      <filename>bin/twitlink</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cdb31db03274f2a5ecba99976461500b971c4360</id>
    </parent>
  </parents>
  <author>
    <name>David Moreno</name>
    <email>david@axiombox.com</email>
  </author>
  <url>http://github.com/damog/twitlink/commit/65178e58f43ca3da751c82e70ded87b7179922e5</url>
  <id>65178e58f43ca3da751c82e70ded87b7179922e5</id>
  <committed-date>2009-05-07T08:32:41-07:00</committed-date>
  <authored-date>2009-05-07T08:32:41-07:00</authored-date>
  <message>fixing title tags and uri escaping properly</message>
  <tree>60f644cfe2a7588e1209a03960a319137bd645a7</tree>
  <committer>
    <name>David Moreno</name>
    <email>david@axiombox.com</email>
  </committer>
</commit>
