FIX: URL with params for svg images should not be light boxed.

This commit is contained in:
Guo Xiang Tan
2018-06-20 10:47:14 +08:00
parent ca4d08f9d9
commit 806f0ca19d
2 changed files with 21 additions and 1 deletions

View File

@@ -541,7 +541,14 @@ class CookedPostProcessor
private
def is_svg?(img)
File.extname(img["src"]) == '.svg'
path =
begin
URI(img["src"]).path
rescue URI::InvalidURIError, URI::InvalidComponentError
nil
end
File.extname(path) == '.svg' if path
end
end