Ignore protocol relative '//' urls.
This commit is contained in:
parent
fe6ef744ed
commit
028769b73f
@ -78,8 +78,8 @@ module OctopressLiquidFilters
|
|||||||
# Replaces relative urls with full urls
|
# Replaces relative urls with full urls
|
||||||
def expand_urls(input, url='')
|
def expand_urls(input, url='')
|
||||||
url ||= '/'
|
url ||= '/'
|
||||||
input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]*)/ do
|
input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\/\"'>]*)(["|']{1})/ do
|
||||||
$1+url+$3
|
$1 + expand_url($3, url) + $4
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user