<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,10 +31,10 @@ module PdfHelper
     
     # Make all paths relative, on disk paths...
     html_string.gsub!(&quot;.com:/&quot;,&quot;.com/&quot;) # strip out bad attachment_fu URLs
-    html_string.gsub!(&quot;src=\&quot;/&quot;,&quot;src=\&quot;#{RAILS_ROOT}/public/&quot;) # reroute absolute paths
+    html_string.gsub!( /src=[&quot;']+([^:]+?)[&quot;']/i ) { |m| &quot;src=\&quot;#{RAILS_ROOT}/public/&quot; + $1 + '&quot;' } # re-route absolute paths
     
     # Remove asset ids on images with a regex
-    html_string.gsub!(/src=&quot;\S+\?\d*&quot;/){|s| s.split('?').first + '&quot;'}
+    html_string.gsub!( /src=[&quot;'](\S+\?\d*)[&quot;']/i ) { |m| 'src=&quot;' + $1.split('?').first + '&quot;' }
     
     # Send the generated PDF file from our html string.
     return prince.pdf_from_string(html_string)</diff>
      <filename>lib/pdf_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b22561b3b7c127926e73a76d9772c4aa7729f9a3</id>
    </parent>
  </parents>
  <author>
    <name>Craig P Jolicoeur</name>
    <email>cpjolicoeur@gmail.com</email>
  </author>
  <url>http://github.com/mbleigh/princely/commit/df6f2728c37c7729c295a9519cb51d98da835053</url>
  <id>df6f2728c37c7729c295a9519cb51d98da835053</id>
  <committed-date>2009-04-29T06:55:40-07:00</committed-date>
  <authored-date>2009-04-28T10:54:12-07:00</authored-date>
  <message>Use better regexp pattern matching

* only add RAILS_ROOT path to local src= attributes
* catch both single and double quote types

Signed-off-by: Michael Bleigh &lt;michael@intridea.com&gt;</message>
  <tree>6f4cd087916c35db469f994676ed1a0983396413</tree>
  <committer>
    <name>Michael Bleigh</name>
    <email>michael@intridea.com</email>
  </committer>
</commit>
