From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: [PATCH] Only use HTML5 fancy elements in HTML5 Date: Mon, 17 Aug 2015 23:50:35 +0800 Message-ID: <877fot6his.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRMgV-0005yw-CA for emacs-orgmode@gnu.org; Mon, 17 Aug 2015 11:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRMgP-0001Sw-QX for emacs-orgmode@gnu.org; Mon, 17 Aug 2015 11:50:51 -0400 Received: from plane.gmane.org ([80.91.229.3]:45598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRMgP-0001SM-CQ for emacs-orgmode@gnu.org; Mon, 17 Aug 2015 11:50:45 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZRMgN-0006ok-6u for emacs-orgmode@gnu.org; Mon, 17 Aug 2015 17:50:43 +0200 Received: from 111.199.144.17 ([111.199.144.17]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Aug 2015 17:50:43 +0200 Received: from eric by 111.199.144.17 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 17 Aug 2015 17:50:43 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Currently, if the global variable `org-html-html5-fancy' is t, some elements of HTML export will use fancy elements even when not exporting to HTML5 at all. Specifically, the TITLE of a document will be wrapped in
tags, even when exporting to XHTML4. I ran into this while making some epub files and the syntax checker barked at me. This patch fills out the check. There's growing redundancy in this file now -- if it seems desirable to have a `org-html-html5-fancy-p' function that encapsulates the paired checks, I'd be happy to provide that. E --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Only-use-HTML5-fancy-elements-in-HTML5.patch >From 921081b428445d42f2ee82b9be9135a95db9e084 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Mon, 17 Aug 2015 23:41:19 +0800 Subject: [PATCH] Only use HTML5 fancy elements in HTML5 * lisp/ox-html.el (org-html-template): The check for HTML5 fancy elements should only apply when exporting to HTML5. --- lisp/ox-html.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index bdcdeee..4f94090 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1932,13 +1932,15 @@ holding export options." (subtitle (plist-get info :subtitle))) (when title (format - (if (plist-get info :html-html5-fancy) + (if (and (org-html-html5-p info) + (plist-get info :html-html5-fancy)) "
\n

%s

\n%s
" "

%s%s

\n") (org-export-data title info) (if subtitle (format - (if (plist-get info :html-html5-fancy) + (if (and (org-html-html5-p info) + (plist-get info :html-html5-fancy)) "

%s

\n" "\n
\n%s\n") (org-export-data subtitle info)) -- 2.5.0 --=-=-=--