mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: URL with params for svg images should not be light boxed.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user