<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,6 +12,10 @@ A Campfire (37Signals) to Jabber interface
 *Note*: Tinder requires Hpricot, which requires a build utilities and Ruby
 development headers.
 
+Start Camper with:
+
+    ruby camper.rb start
+
 ## Configuration
 
 You must setup a config.yaml file in a $HOME/.camper directory, formatted like so:</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -79,7 +79,15 @@ module Camper
 
     def im_deliver(msg)
       to = config[:deliver_to]
-      m = Jabber::Message::new(to, Hpricot(msg).to_plain_text).set_type(:chat)
+      msg.gsub!(/\\&quot;/, '&quot;')
+      doc = Hpricot(msg)
+      if img = doc.at(&quot;img&quot;)
+        src = img['src']
+        img.swap(src)
+      end
+
+      msg = doc.to_html
+      m = Jabber::Message::new(to, CGI.escapeHTML(Hpricot(msg).to_plain_text)).set_type(:chat)
 
       # HTML Delivery thanks to http://devblog.famundo.com/articles/category/xmpp4r-jabber
       h = REXML::Element::new(&quot;html&quot;)
@@ -112,8 +120,7 @@ module Camper
     def deliver_campfire_messages
       chat.listen.each do |msg|
         next if msg[:person].empty?
-        text = &quot;#{msg[:person]}: #{msg[:message]}&quot;.gsub(/(\\n)+/, &quot;\n&quot;).gsub(/\\u([0-9a-fA-F]+)/) { [$1.to_i(16)].pack(&quot;U&quot;) }
-        text.gsub!(/&lt;a href=\\&quot;(.*)\\&quot; target=\\&quot;_blank\\&quot;&gt;(.*)&lt;\/a&gt;/, '\2&lt;\1&gt;')
+        text = &quot;#{msg[:person]}: #{msg[:message]}&quot;.gsub(/(\\n)+/, &quot;\n&quot;).gsub(/\\u([0-9a-zA-Z]{4})/) { [$1.to_i(16)].pack(&quot;U&quot;) }
         im_deliver(text)
       end
     end</diff>
      <filename>camper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>da84417293275d2c57a290344b248cde2756ebe2</id>
    </parent>
  </parents>
  <author>
    <name>Jared Kuolt</name>
    <email>me@superjared.com</email>
  </author>
  <url>http://github.com/JaredKuolt/camper/commit/79540d37e8cc9346e99248d66eb199876b16d7f8</url>
  <id>79540d37e8cc9346e99248d66eb199876b16d7f8</id>
  <committed-date>2009-06-06T02:12:45-07:00</committed-date>
  <authored-date>2009-06-06T02:12:45-07:00</authored-date>
  <message>Fix message parsing that caused camper to die silently</message>
  <tree>3778301cb07b7a175f0045a1b9e8ec9ca3216a11</tree>
  <committer>
    <name>Jared Kuolt</name>
    <email>me@superjared.com</email>
  </committer>
</commit>
