all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command
Date: Mon, 1 Apr 2024 17:29:40 +0700	[thread overview]
Message-ID: <uue2am$mn6$1@ciao.gmane.io> (raw)
In-Reply-To: <87v852g64k.fsf@localhost>

On 31/03/2024 15:25, Ihor Radchenko wrote:
> Max Nikulin writes:
>>
>> I think it is in the right direction.
>> - Manual needs update as well.
>> - I would explicitly stress that quotes causes undefined or even
>> dangerous behavior. See e.g. the last paragraph
>> https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html
> 
> I have incorporated the above suggestions into the attached version of
> the patch.

Thanks, I have not tried the updated patch in action, but it looks like 
what I expect.

> +++ b/etc/ORG-NEWS
> @@ -13,6 +13,16 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
>  
>  * Version 9.7 (not released yet)
>  ** Important announcements and breaking changes
> +*** ~org-latex-to-mathml-convert-command~ and ~org-latex-to-html-convert-command~ shell-escape LaTeX code
> +
> +Previously, ~org-latex-to-mathml-convert-command~ and
> +~org-latex-to-html-convert-command~ replaced %i placeholders with raw
> +LaTeX fragment text, potentially triggering shell-expansion.
> +
> +Now, the %i placeholders are shell-escaped to prevent shell expansion.
> +
> +The existing customizations that assume no shell-escaping must be updated.
> +

I would consider explicit mention of stripping quotes

+Previously, =%i= placeholders in the ~org-latex-to-mathml-convert-command~
and ~org-latex-to-html-convert-command~ user options were replaced
with raw LaTeX fragment text, potentially triggering shell-expansion
and incorrect result.

Now, the =%i= placeholders are shell-escaped to prevent shell expansion.

If you have single or double quotes around =%i= then update
customizations and remove quotes.




  reply	other threads:[~2024-04-01 10:30 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 23:10 Warn about shell-expansion in the docstring of org-latex-to-html-convert-command Martin Edström
2024-02-18 16:06 ` Ihor Radchenko
2024-02-18 18:56   ` Martin Edström
2024-02-18 19:36     ` Martin Edström
2024-02-19  8:30       ` Ihor Radchenko
2024-02-21 14:38       ` Max Nikulin
2024-02-21 14:57         ` Martin Edström
2024-02-21 15:04         ` Martin Edström
2024-02-21 15:08           ` Martin Edström
2024-02-23 12:46         ` Ihor Radchenko
2024-02-25 10:41           ` Max Nikulin
2024-02-26 10:48             ` Ihor Radchenko
2024-02-26 16:37               ` Max Nikulin
2024-03-08 11:16                 ` Ihor Radchenko
2024-03-09 15:23                   ` Max Nikulin
2024-03-10  5:02                     ` [PATCH] Unit tests for function calling MathML converters (Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command) Max Nikulin
2024-03-31  8:27                       ` Ihor Radchenko
2024-04-01 10:39                         ` Max Nikulin
2024-04-01 11:23                           ` Ihor Radchenko
2024-03-12 13:03                     ` Warn about shell-expansion in the docstring of org-latex-to-html-convert-command Ihor Radchenko
2024-03-13 14:27                       ` Max Nikulin
2024-03-15 13:49                         ` Ihor Radchenko
2024-03-18 10:50                           ` Max Nikulin
2024-03-19 14:48                             ` Ihor Radchenko
2024-03-19 14:49                               ` Ihor Radchenko
2024-03-19 16:22                                 ` Max Nikulin
2024-03-19 16:27                                   ` Ihor Radchenko
2024-03-19 16:45                                     ` fixup! and git Max Nikulin
2024-03-19 16:50                                       ` Ihor Radchenko
2024-03-31  8:25                     ` Warn about shell-expansion in the docstring of org-latex-to-html-convert-command Ihor Radchenko
2024-04-01 10:29                       ` Max Nikulin [this message]
2024-04-01 11:15                         ` Ihor Radchenko
2024-03-05 12:01             ` Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='uue2am$mn6$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.