diff options
author | Holger Dürer <me@hdurer.net> | 2017-06-05 18:19:18 +0100 |
---|---|---|
committer | Johnson Denen <johnson.denen@gmail.com> | 2017-06-19 10:46:35 -0400 |
commit | 3602d13fe7687a3b931ba037365191307e99da8d (patch) | |
tree | 86025d7a55239949934723155408bd217c8c5216 /lisp/mastodon-media.el | |
parent | 8c841d2ad3d60997f7aea725da86b83ac80dcd61 (diff) |
More robust bad url detection.
Diffstat (limited to 'lisp/mastodon-media.el')
-rw-r--r-- | lisp/mastodon-media.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index f5d67ca..0a4c3de 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -201,9 +201,10 @@ found." "Checks to make sure that the missing string has not been returned." - (let ((missing "/files/small/missing.png")) - (and link - (not (equal link missing))))) + (and link + (> (length link) 8) + (or (string= "http://" (substring link 0 7)) + (string= "https://" (substring link 0 8))))) (defun mastodon-media--inline-images () "Find all `Media_Links:' in the buffer replacing them with the referenced image." |