diff options
author | Brandon Mathis <brandon@imathis.com> | 2014-02-24 15:14:10 -0600 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2014-02-24 15:14:10 -0600 |
commit | 028769b73f1861e593b5bd6c723773a37b97f6cb (patch) | |
tree | 72246ec11c7ca9b5d3f84d39b9c6c25d7458d43b | |
parent | fe6ef744ede363688e8538ac091519e00c30487c (diff) | |
download | my_new_personal_website-028769b73f1861e593b5bd6c723773a37b97f6cb.tar.xz my_new_personal_website-028769b73f1861e593b5bd6c723773a37b97f6cb.zip |
Ignore protocol relative '//' urls.
Diffstat (limited to '')
-rw-r--r-- | plugins/octopress_filters.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index 091f75aa..c07224fb 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -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})(\/[^\"'>]*)/ do - $1+url+$3 + input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\/\"'>]*)(["|']{1})/ do + $1 + expand_url($3, url) + $4 end end |