From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id HLFZK4L4x1/dJgAA0tVLHw (envelope-from ) for ; Wed, 02 Dec 2020 20:26:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4BWsJoL4x19tfgAA1q6Kng (envelope-from ) for ; Wed, 02 Dec 2020 20:26:42 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DE0AD94050F for ; Wed, 2 Dec 2020 20:26:41 +0000 (UTC) Received: from localhost ([::1]:58892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkYhy-0007I3-Ss for larch@yhetil.org; Wed, 02 Dec 2020 15:26:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkYhM-0007HD-3d for emacs-orgmode@gnu.org; Wed, 02 Dec 2020 15:26:00 -0500 Received: from server173-4.web-hosting.com ([68.65.122.210]:57998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkYhJ-0007CA-Vm for emacs-orgmode@gnu.org; Wed, 02 Dec 2020 15:25:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=isnotmyreal.name; s=default; h=Content-Transfer-Encoding:Content-Type: Message-ID:References:In-Reply-To:Subject:To:From:Date:MIME-Version:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pEPACPRieH6l+OSXdFuWluAHIxT6gk4BdOmH6lh10QA=; b=DUZSh2JJVAcwdtU7uvHtpXUVsZ 3hkFJlRHbgsPO42k9zamNY+IFRh6Q4NkDlAQvYmo3zNWPRQZMktUQ6r4CzEJT3jv3l/zdUdNABnrv eJbplC88p/x2yLTnnD/Jc0+FxsDr8wmZd9JzS+TiA1LsiRrEDHMI24yY39wmAf0kPa8fZC8DuJXBX 44eitlRHwBo+AgIIul71tZE04TpQly39T6TcUUg1hduRp3KuuX3JJybHh8fpAFChUgmjNT16V18lv lpmT7eQtZvzQKK573mRRSFUp9jQBekZenGCzSTDYmNvpl7oxOBwqrQxW7Lnb5Oy7AZsTlAH+dnrRX EVL/5wRw==; Received: from [::1] (port=40950 helo=server173.web-hosting.com) by server173.web-hosting.com with esmtpa (Exim 4.93) (envelope-from ) id 1kkYhC-003msw-D8 for emacs-orgmode@gnu.org; Wed, 02 Dec 2020 15:25:55 -0500 MIME-Version: 1.0 Date: Wed, 02 Dec 2020 15:25:50 -0500 From: TRS-80 To: Org-mode Subject: Re: Exporting .org to .md for Sourcehut (sr.ht); ox-md not following Markdown spec? In-Reply-To: References: <9aa624fff553d9d140a6d89aab12e21b@isnotmyreal.name> Message-ID: <97098a4ea3adde3a51cf3683bc26c86c@isnotmyreal.name> X-Sender: lists.trs-80@isnotmyreal.name User-Agent: Roundcube Webmail/1.3.15 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-0.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server173.web-hosting.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - isnotmyreal.name X-Get-Message-Sender-Via: server173.web-hosting.com: authenticated_id: lists.trs-80@isnotmyreal.name X-Authenticated-Sender: server173.web-hosting.com: lists.trs-80@isnotmyreal.name X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched Received-SPF: pass client-ip=68.65.122.210; envelope-from=lists.trs-80@isnotmyreal.name; helo=server173-4.web-hosting.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.28 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=isnotmyreal.name header.s=default header.b=DUZSh2JJ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: DE0AD94050F X-Spam-Score: -0.28 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: jtatfCN1Co+k >> On Wed, Dec 2, 2020 at 7:54 PM TRS-80 >> wrote: >> >> Some further digging revealed that the ox-md exporter (which itself >> is derived from the HTML exporter(?) makes extensive use of the id >> attribute in links. And Sourcehut's HTML sanitizer only allows href >> and title attributes (not id).[1] >> >> [1] https://man.sr.ht/markdown/#post-processing > On 2020-12-02 14:45, Diego Zamboni wrote: > > (note: Markdown allows embedded HTML, so ox-md's behavior is not > incorrect) Right. However, unless I am missing something, they (Sourcehut) are passing the HTML through, but their sanitizer is only allowing a subset of attributes. Look closely (on the sr.ht Markdown page we both have now linked) at what attributes are allowed for links: a: href, title Only href and title. No id! > Note that according to https://man.sr.ht/markdown/#post-processing, > Sourcehut uses CommonMark, not plain Markdown, so I guess that's why > it doesn't allow all HTML tags. Yes, I am aware they use CommonMark. However it seems to me that CommonMark is just a less ambiguously defined version of Markdown, designed to address those particular criticisms of the original. I don't know if there is anything in CommonMark spec itself that forbids passing HTML through, and I did not bother to look that up (and thus I could be wrong) however I think the problem is rather what I already said above about id attributes being blocked, by Sourcehut particular HTML sanitizer. > There seems to be no ox-commonmark (that I could find) but pandoc does > support it, so you could probably use ox-pandoc > (https://github.com/kawabata/ox-pandoc) to export your documents in > CommonMark format. I did try using command line pandoc, and ran into some problems (which I outlined already in separate reply to Jean Louis), but maybe I give this a try, too. Thanks. Cheers, TRS-80