From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bidirectional text and URLs Date: Mon, 01 Dec 2014 21:12:08 +0200 Message-ID: <83oarn6v7b.fsf@gnu.org> References: <87a93cngwv.fsf@uwakimon.sk.tsukuba.ac.jp> <837fyfml31.fsf@gnu.org> <874mtio7wh.fsf@uwakimon.sk.tsukuba.ac.jp> <83r3wml8kq.fsf@gnu.org> <87zjb8n6th.fsf@uwakimon.sk.tsukuba.ac.jp> <837fyb8htc.fsf@gnu.org> <87d283mdaw.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417461148 28518 80.91.229.3 (1 Dec 2014 19:12:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 19:12:28 +0000 (UTC) Cc: larsi@gnus.org, rms@gnu.org, emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 01 20:12:20 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XvWOQ-00069d-Ou for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 20:12:18 +0100 Original-Received: from localhost ([::1]:33441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvWOQ-0002gR-9o for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 14:12:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvWOH-0002fT-Qq for emacs-devel@gnu.org; Mon, 01 Dec 2014 14:12:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvWOC-0006tp-Hz for emacs-devel@gnu.org; Mon, 01 Dec 2014 14:12:09 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:47081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvWOC-0006tV-Ap; Mon, 01 Dec 2014 14:12:04 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NFX00B003HJJE00@a-mtaout21.012.net.il>; Mon, 01 Dec 2014 21:12:02 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFX00BZV401I940@a-mtaout21.012.net.il>; Mon, 01 Dec 2014 21:12:02 +0200 (IST) In-reply-to: <87d283mdaw.fsf@uwakimon.sk.tsukuba.ac.jp> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178625 Archived-At: > From: "Stephen J. Turnbull" > Cc: rms@gnu.org, > larsi@gnus.org, > emacs-devel@gnu.org > Date: Tue, 02 Dec 2014 03:32:07 +0900 > > Eli Zaretskii writes: > > > . modify the way the relevant directional controls are displayed to > > make them prominently apparent > > -0 I don't think this will help enough, especially for the users who > would most benefit from Emacs's automated paranoia (ie, those who read > bidi but not RFCs). This alternative makes the least changes on display. > Note that RFC 3987 specifies that bidirectional IRIs must *always* be > displayed with the UBA, and as if in an LRE embedding. I'm not sure > how you would enforce it, but I believe this would defang larsi's > example (ie, at the start of the URI proper in logical order insert a > LRE, and at the end a PDF -- any directional format characters between > those points are nonconforming to RFC 3987, section 4.1, last > paragraph). Using an LRE..PDF embedding is a possibility, but it can be defeated: the UBA mandates that any embeddings above some predefined fixed depth are to be ignored. So a malicious code could insert a large enough number of RLOs such that any LRE would be ignored. That's one of the reasons why I prefer not to poke the text with additional directional controls. > > . replace the relevant directional controls with percent-hex encoded > > representation, which will as result disable the reordering > > -1 If they're outside of the IRI, this will just make things ugly. Ugly, yes. But if these cases are sufficiently rare, that ugliness is useful, I think, as it will attract attention. > If they're inside the IRI, they're non-conforming and therefore bogus, > and would be caught by the tooltip. Yes, but tooltips could be overlooked (or even disabled globally by the user). > > . cover the relevant directional controls with a display property > > (e.g., with a display string " "), which will also disable > > reordering > > -0 This is just a specific implementation of the first option above, right? No, it also disables reordering, whereas the first one doesn't.