]> git.eshelyaron.com Git - emacs.git/commit
Better detection of potentially malicious bidi text
authorEli Zaretskii <eliz@gnu.org>
Thu, 4 Nov 2021 18:33:26 +0000 (20:33 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 4 Nov 2021 18:33:26 +0000 (20:33 +0200)
commitb96855310efed13e0db1403759b686b9bc3e7490
treef55f98d13e860f5f3f48180355567d0ff7ae040a
parentf875ed53f6795c5bc12e2a73070b87eb34168014
Better detection of potentially malicious bidi text

* src/bidi.c (bidi_find_first_overridden): Extend to detect more
subtle effects of directional formatting controls, to include
embeddings and isolates.
* src/xdisp.c (Fbidi_find_overridden_directionality): Accept an
additional argument BASE-DIR to specify the base direction of the
paragraphs.

* lisp/international/mule-cmds.el (confusingly-reordered): New
face.
(reorder-starters, reorder-enders): New variables.
(highlight-confusing-reorderings): New command to detect and
highlight suspiciously reordered text.

* test/src/xdisp-tests.el
(xdisp-tests--find-directional-overrides): New test.

* etc/NEWS: Announce the new and improved features.
* etc/tutorials/TUTORIAL.he: Fix embeddings with incorrect
directions.
etc/NEWS
etc/tutorials/TUTORIAL.he
lisp/international/mule-cmds.el
src/bidi.c
src/xdisp.c
test/src/xdisp-tests.el