emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Visher <tim.visher@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: Emacs Org Mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: ox-html Incorrectly (?) Puts HTML Into the `<title>` Tag
Date: Tue, 12 Jan 2021 09:51:29 -0500	[thread overview]
Message-ID: <CAHa53uzYX5iUk-xmC_np4Vi_YyawQKdXXeOMHoV79qDDtkudGQ@mail.gmail.com> (raw)
In-Reply-To: <874kjndkad.fsf@kyleam.com>

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

On Mon, Jan 11, 2021 at 8:19 PM Kyle Meyer <kyle@kyleam.com> wrote:

> Tim Visher writes:
>
> > 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.
> [...]
> > Is this something we'd take a patch for?
>
> Thanks for reporting.  Is this addressed by the in-progress series at
> <https://orgmode.org/list/87o8hwpz34.fsf@gmail.com/>?
>

IIUC yes. I believe the following section of the diff should address it.

```
+  (let* ((title (org-html-plain-text
+ (org-element-interpret-data (plist-get info :title)) info))
+ ;; Set title to an invisible character instead of leaving it
+ ;; empty, which is invalid.
+ (title (if (org-string-nw-p title) title "&lrm;"))
```

If I'm reading the code correctly, `org-html-plain-text` is a specialized
form of converting org data into a plain text string with no markup. If I
have that correct then I believe you're right.

Is that your read as well?

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

  reply	other threads:[~2021-01-12 14:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 15:32 Tim Visher
2021-01-12  1:19 ` Kyle Meyer
2021-01-12 14:51   ` Tim Visher [this message]
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=CAHa53uzYX5iUk-xmC_np4Vi_YyawQKdXXeOMHoV79qDDtkudGQ@mail.gmail.com \
    --to=tim.visher@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    --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).