Permalink
Browse files

Don't prepend file:// to external assets when inlining CSS.

  • Loading branch information...
1 parent a92d2e4 commit 1d2fbf6e25db39f0566c7f76f1448a577ca64e44 @goncalossilva goncalossilva committed Mar 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/showoff.rb
View
@@ -477,7 +477,7 @@ def pdf(static=true)
# Process inline css and js for included images
# The css uses relative paths for images and we prepend the file url
- html.gsub!(/url\([\"\']?(.*?)[\"\']?\)/) do |s|
+ html.gsub!(/url\([\"\']?(?!https?:\/\/)(.*?)[\"\']?\)/) do |s|
"url(file://#{settings.pres_dir}/#{$1})"
end

0 comments on commit 1d2fbf6

Please sign in to comment.