Commit 0ead88e6 authored by Brandon Mathis's avatar Brandon Mathis

Fixed the expand_url filter. Finally.

Thanks @larryprice
parent 13214233
......@@ -78,8 +78,8 @@ module OctopressLiquidFilters
# Replaces relative urls with full urls
def expand_urls(input, url='')
url ||= '/'
input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\/\"'>]*)(["|']{1})/ do
$1 + $3 + $4
input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\/>]{1}[^\"'>]*)/ do
$1+url+$3
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment