mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
mh-x-image-url-sane-p: accept "https" URLs
* lisp/mh-e/mh-xface.el (mh-x-image-url-sane-p): Accept https URLs. * test/lisp/mh-e/mh-xface.el: New file, to test mh-x-image-url-sane-p.
This commit is contained in:
parent
5f1ee1f8e6
commit
aa27c42cf9
2 changed files with 41 additions and 4 deletions
|
|
@ -391,10 +391,12 @@ filenames. In addition, replaces * with %2a. See URL
|
|||
(defun mh-x-image-url-sane-p (url)
|
||||
"Check if URL is something sensible."
|
||||
(let ((len (length url)))
|
||||
(cond ((< len 5) nil)
|
||||
((not (equal (substring url 0 5) "http:")) nil)
|
||||
((> len 100) nil)
|
||||
(t t))))
|
||||
(cond ((> len 100) nil)
|
||||
((and (>= len 5)
|
||||
(equal (substring url 0 5) "http:") t))
|
||||
((and (>= len 6)
|
||||
(equal (substring url 0 6) "https:") t))
|
||||
(t nil))))
|
||||
|
||||
(defun mh-x-image-display (image marker)
|
||||
"Display IMAGE at MARKER."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue