mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-01 09:39:51 -04:00
do not throw exception when parsing a bad URI
This commit is contained in:
parent
c79ab3fc2e
commit
da52ac88b0
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue