org-latex-preview: Add protection when `untrusted-content' is non-nil
authorIhor Radchenko <yantar92@posteo.net>
Tue, 20 Feb 2024 09:47:24 +0000 (12:47 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 24 Mar 2024 12:40:48 +0000 (08:40 -0400)
commit6f9ea396f49cbe38c2173e0a72ba6af3e03b271c
treefadae4916375ceef762715fdbd450a641a4b54ff
parent937b9042ad7426acdcca33e3d931d8f495bdd804
org-latex-preview: Add protection when `untrusted-content' is non-nil

* lisp/org/org.el (org--latex-preview-when-risky): New variable
controlling how to handle LaTeX previews in Org files from untrusted
origin.
(org-latex-preview): Consult `org--latex-preview-when-risky' before
generating previews.

This patch adds a layer of protection when LaTeX preview is requested
for an email attachment, where `untrusted-content' is set to non-nil.
lisp/org/org.el