Skip to content
Browse files

expand_urls now correctly matches urls pointing to the root directory…

…, allowing / to be replaced with /subdir/ if site is configured with a different root directory
  • Loading branch information...
1 parent 65d2624 commit b1b56e4b6d2f2f0b99804a0cabcd50adcb0cbdf5 @imathis imathis committed with Aug 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugins/octopress_filters.rb
View
2 plugins/octopress_filters.rb
@@ -58,7 +58,7 @@ def backtick_codeblock(input)
# Replaces relative urls with full urls
def expand_urls(input, url='')
url ||= '/'
- input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]+)/ do
+ input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]*)/ do
$1+url+$3
end
end

0 comments on commit b1b56e4

Please sign in to comment.
Something went wrong with that request. Please try again.