emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Visher <tim.visher@gmail.com>
To: Emacs Org Mode mailing list <emacs-orgmode@gnu.org>
Subject: ox-html Incorrectly (?) Puts HTML Into the `<title>` Tag
Date: Mon, 11 Jan 2021 10:32:01 -0500	[thread overview]
Message-ID: <CAHa53uwWmy0uu9SwsOge-==i3nW2Sa1pLeXQXPOU=PnxXH9rDA@mail.gmail.com> (raw)

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

Hi all,

I noticed over the weekend that the `<title>` tag in an ox-html document is
populated with HTML when inline formatting like bold or italics is used.
I'm running org 9.4.4 but even on HEAD
<https://code.orgmode.org/bzg/org-mode/src/9ea7ff5e2f8f9f280f8022cade62c1a3bba1478c/lisp/ox-html.el#L2092-L2111>
this
behavior seems to be the same where `(org-export-data title …)` is used to
populate the title rather than something that would render the title
textually.

My understanding from MDN
<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title> is that
`title` tags should never contain markup.

Is this something we'd take a patch for? My thought is that the title
should be converted using the text backend by default, perhaps with a
configuration variable that would let you specify a different one (for
instance markdown) but I wouldn't go that far at first. Of course at
minimum since org is textual it could just use the title without exporting
at all but I think that doesn't go far enough. The other possibility would
be to somehow strip all special characters from the title but I think that
goes much too far.

Thanks in advance!

--

In Christ,

Timmy V.

https://blog.twonegatives.com
http://five.sentenc.es

[-- Attachment #2: Type: text/html, Size: 1518 bytes --]

             reply	other threads:[~2021-01-11 15:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 15:32 Tim Visher [this message]
2021-01-12  1:19 ` Kyle Meyer
2021-01-12 14:51   ` Tim Visher
2021-01-13  3:43     ` Kyle Meyer
2021-01-13 15:26       ` Tim Visher
2021-01-21  4:10         ` Kyle Meyer
2021-03-30 22:58           ` Tim Visher
2021-04-11 15:11             ` Tim Visher
2021-04-20  3:01             ` Kyle Meyer
2021-04-20  4:58               ` Jens Lechtenboerger
2021-04-20 21:29                 ` Tim Visher
2021-04-21  5:21                   ` Jens Lechtenboerger
2021-04-21  6:39                     ` Dr. Arne Babenhauserheide
2021-04-21 15:05                       ` Tim Visher
2021-04-22 13:52                         ` Nicolas Goaziou
2021-04-22 14:08                           ` Tim Visher
2021-04-22 15:36                             ` Nicolas Goaziou
2021-04-22 17:34                               ` Tim Visher

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='CAHa53uwWmy0uu9SwsOge-==i3nW2Sa1pLeXQXPOU=PnxXH9rDA@mail.gmail.com' \
    --to=tim.visher@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: ox-html Incorrectly (?) Puts HTML Into the `<title>` Tag' \
    /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

Code repositories for project(s) associated with this 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).