Function: org-lint-percent-encoding-link-escape

org-lint-percent-encoding-link-escape is a byte-compiled function defined in org-lint.el.gz.

Signature

(org-lint-percent-encoding-link-escape AST)

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-lint.el.gz
(defun org-lint-percent-encoding-link-escape (ast)
  (org-element-map ast 'link
    (lambda (l)
      (when (eq 'bracket (org-element-property :format l))
	(let* ((uri (org-element-property :path l))
	       (start 0)
	       (obsolete-flag
		(catch :obsolete
		  (while (string-match "%\\(..\\)?" uri start)
		    (setq start (match-end 0))
		    (unless (member (match-string 1 uri) '("25" "5B" "5D" "20"))
		      (throw :obsolete nil)))
		  (string-match-p "%" uri))))
	  (when obsolete-flag
	    (list (org-element-begin l)
		  "Link escaped with obsolete percent-encoding syntax")))))))