Browse code

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

Brandon Mathis authored on 16/08/2011 at 04:41:57
Showing 1 changed files
... ...
@@ -58,7 +58,7 @@ module OctopressFilters
58 58
   # Replaces relative urls with full urls
59 59
   def expand_urls(input, url='')
60 60
     url ||= '/'
61
-    input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]+)/ do
61
+    input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]*)/ do
62 62
       $1+url+$3
63 63
     end
64 64
   end