all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] ox-html output does not pass validation for html4-strict doctype [9.7-pre (release_9.6.23-1423-gcea6a1.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]
@ 2024-03-25 11:18 Ihor Radchenko
  2024-03-27 15:35 ` Max Nikulin
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-03-25 11:18 UTC (permalink / raw)
  To: emacs-orgmode, orgmode; +Cc: c.buhtz

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]


Setting (setq org-html-doctype "html4-strict") and exporting a trivial
Org document (like the attached) to HTML fails to pass validation at
https://validator.w3.org/

The error is

 Line 6, Column 72: character data is not allowed here
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

 ....using XHTML-style self-closing tags (such as <meta ... />) in HTML
 4.01 or earlier. To fix, remove the extra slash ('/') character. For
 more information about the reasons for this, see Empty elements in
 SGML, HTML, XML, and XHTML.

caused by /> self-closing tag.

However, dropping /> will lead to validation failing for the default
value of `org-html-doctype' - "xhtml-strict".

I am wondering whether it is at all possible to use the same syntax and
yet pass validation for all the allowed values of `org-html-doctype':
"html4-strict", "html4-transitional", "html4-frameset", "xhtml-strict",
"xhtml-transitional", "xhtml-frameset", "xhtml-11", "html5", "xhtml5".


[-- Attachment #2: 20240322205907-testmath.org --]
[-- Type: application/vnd.lotus-organizer, Size: 119 bytes --]

:PROPERTIES:
:ID:       d6de1b70-d3d9-4f6a-be94-4d23d9ed2bfc
:END:
#+title: testmath
#+date: [2024-03-22 20:59]
foobar

[-- Attachment #3: Type: text/plain, Size: 457 bytes --]


Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
 of 2024-03-24
Package: Org mode version 9.7-pre (release_9.6.23-1423-gcea6a1.dirty @ /home/yantar92/.emacs.d/straight/build/org/)
-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-28 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25 11:18 [BUG] ox-html output does not pass validation for html4-strict doctype [9.7-pre (release_9.6.23-1423-gcea6a1.dirty @ /home/yantar92/.emacs.d/straight/build/org/)] Ihor Radchenko
2024-03-27 15:35 ` Max Nikulin
2024-03-28 11:27   ` ox-html content-type metadata (was: [BUG] ox-html output does not pass validation for html4-strict doctype [9.7-pre (release_9.6.23-1423-gcea6a1.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]) Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.