From a95e9da22342fcd7fd5856ab392e53e02e8559e5 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 14 Mar 2015 01:25:48 +0100 Subject: [PATCH] ox-html: Handle missing title better * ox-html.el (org-html-template): Only insert title when nonnil. Empty headings trigger a W3 Validator warning. --- lisp/ox-html.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index ad71cda33..92fe3d913 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1866,9 +1866,10 @@ holding export options." (format "<%s id=\"%s\">\n" (nth 1 div) (nth 2 div))) ;; Document title. (when (plist-get info :with-title) - (let ((title (plist-get info :title))) - (format "

%s

\n" - (org-export-data (or title "") info)))) + (let ((title (org-export-data + (or (plist-get info :title) "") info))) + (when (org-string-nw-p title) + (format "

%s

\n" title)))) contents (format "\n" (nth 1 (assq 'content (plist-get info :html-divs)))) ;; Postamble. -- 2.11.4.GIT