emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: emacs-orgmode@gnu.org, orgmode@tec.tecosaur.net
Cc: c.buhtz@posteo.jp
Subject: [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/)]
Date: Mon, 25 Mar 2024 11:18:25 +0000	[thread overview]
Message-ID: <87v85ad0fy.fsf@localhost> (raw)

[-- 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>

             reply	other threads:[~2024-03-25 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 11:18 Ihor Radchenko [this message]
2024-03-27 15:35 ` [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/)] 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v85ad0fy.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=c.buhtz@posteo.jp \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@tec.tecosaur.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).