mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
do not throw exception when parsing a bad URI
This commit is contained in:
parent
c79ab3fc2e
commit
da52ac88b0
@ -181,6 +181,7 @@ class CookedPostProcessor
|
||||
def is_valid_image_uri?(url)
|
||||
uri = URI.parse(url)
|
||||
%w(http https).include? uri.scheme
|
||||
rescue URI::InvalidURIError
|
||||
end
|
||||
|
||||
def dirty?
|
||||
|
Loading…
x
Reference in New Issue
Block a user