From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: luangruo@yahoo.com, emacs-devel@gnu.org
Subject: Re: master ce63f91025: Add textsec functions for verifying email addresses
Date: Thu, 20 Jan 2022 13:29:40 +0200 [thread overview]
Message-ID: <834k5yr6fv.fsf@gnu.org> (raw)
In-Reply-To: <874k5y3brg.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 20 Jan 2022 12:08:35 +0100)
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: luangruo@yahoo.com, emacs-devel@gnu.org
> Date: Thu, 20 Jan 2022 12:08:35 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> (insert "Lars Ingebrigtsen\N{RIGHT-TO-LEFT OVERRIDE}" "larsi@gnus.org")
> >>
> >> Boom.
> >
> > Then you must pass the entire concatenated string to the function. Or
> > call it on buffer text after inserting the string there. This
> > function must see the characters affected by the bidi controls, to
> > tell whether the control do any harm.
>
> I see. Perhaps we should have another function in addition -- one that
> says "does this string (if inserted into a buffer) possibly affect other
> text"? I.e., "does it have dangling directional modifiers"? I think
> that's really what we want here (and why the Unicode recommendations are
> like they are in this area).
The problem is that the answer to that question depends on the
following text. E.g., if RIGHT-TO-LEFT OVERRIDE is followed by R2L
characters, they will not be affected.
We could try appending some representative text to the string being
tested, of course. For example, append a fixed string like this:
a1א:!
and see if the function returns non-nil position that points to one of
those characters; if so, consider the original string "unsafe".
Would that be good enough for textsec purposes?
next prev parent reply other threads:[~2022-01-20 11:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <164250841214.433.17670666873471731764@vcs2.savannah.gnu.org>
[not found] ` <20220118122012.7A3A4C0DA1B@vcs2.savannah.gnu.org>
2022-01-18 13:30 ` master ce63f91025: Add textsec functions for verifying email addresses Po Lu
2022-01-18 18:42 ` Eli Zaretskii
2022-01-20 8:47 ` Lars Ingebrigtsen
2022-01-20 9:40 ` Eli Zaretskii
2022-01-20 9:49 ` Lars Ingebrigtsen
2022-01-20 10:20 ` Eli Zaretskii
2022-01-20 11:08 ` Lars Ingebrigtsen
2022-01-20 11:29 ` Eli Zaretskii [this message]
2022-01-20 12:46 ` Lars Ingebrigtsen
2022-01-22 10:01 ` Eli Zaretskii
2022-01-22 11:25 ` Lars Ingebrigtsen
2022-01-20 8:49 ` Lars Ingebrigtsen
2022-01-20 10:04 ` Eli Zaretskii
2022-01-20 10:07 ` Lars Ingebrigtsen
2022-01-18 13:38 ` Robert Pluim
2022-01-19 14:37 ` Lars Ingebrigtsen
2022-01-19 14:49 ` Robert Pluim
2022-01-19 14:54 ` Lars Ingebrigtsen
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=834k5yr6fv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=luangruo@yahoo.com \
/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.