Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does/should EPUB support HTML <base>? #1699

Closed
dlazin opened this issue Jun 11, 2021 · 6 comments · Fixed by #1720
Closed

Does/should EPUB support HTML <base>? #1699

dlazin opened this issue Jun 11, 2021 · 6 comments · Fixed by #1720
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Topic-ContentDocs The issue affects EPUB content documents

Comments

@dlazin
Copy link
Contributor

dlazin commented Jun 11, 2021

In today's WG meeting, while discussing #1681 (root-relative URLs) and #1456 (xml:base), I asked whether reading systems do or should support the <base> tag.

IMO, whether we support <base> affects whether root-relative URLs should be supported.

@OriIdan
Copy link

OriIdan commented Jun 11, 2021 via email

@iherman
Copy link
Member

iherman commented Jun 11, 2021

The <base> tag can have either absolute or relative URL-s as values. Setting an absolute URL as a value for a content document is messy at best... because all relative links will point out of the package. We should probably avoid that, i.e., disallow it.

I could see a value for hand-edited EPUBs to have a <base> tag as a relative URL as value. I am a little bit worried, though, that authors would feel it inconsistent to allow for the <base> element in HTML while xml:base has been disallowed.

@mattgarrish
Copy link
Member

We should probably avoid that, i.e., disallow it.

Seems kind of indiscriminate to disallow absolute URLs that are easy to understand where the resolved relative paths are going but allow relative URLs that are more likely to lead to weird outcomes like resources seemingly appearing outside the container.

It's not really a "base" tag anymore, in the sense it makes relative paths absolute. More of a thing you stick in front of relative paths and then see if they're still relative paths in which case you don't use this thing again but find the actual base of the document and add that on, too.

Are there any known uses of base in epubs, though?

Even for packaging web pages this seems problematic, as it's more likely you'd have to remove any base tags to to get working relative paths.

It might be better to simply recommend authors not use the tag.

@mattgarrish mattgarrish added the Topic-ContentDocs The issue affects EPUB content documents label Jun 11, 2021
@wareid wareid added the Agenda+ Issues that should be discussed during the next working group call. label Jun 16, 2021
@dauwhe
Copy link
Contributor

dauwhe commented Jun 16, 2021

Just a bit worried about saying there are HTML elements that we shouldn't use in EPUB.

@mattgarrish
Copy link
Member

We tepidly crossed that bridge when we started "discouraging" things... https://w3c.github.io/epub-specs/epub33/core/#sec-xhtml-deviations-discouraged

Could be the place for this, too?

@iherman
Copy link
Member

iherman commented Jun 18, 2021

The issue was discussed in a meeting on 2021-06-18

List of resolutions:

View the transcript

1. Does/should EPUB support the <base> element?

See github issue #1699.

Wendy Reid: this came up in last week's session in discussion about root-relative URLs, HTML base, etc.
… perhaps we recommend authors not use it? or avoid discussing it entirely?

Ivan Herman: problem i see is what it means if base is given the value of a relative URI
… an absolute URL value is also problematic because it goes out of the package
… and then mgarrish pointed out that it makes it complicated if we start specifying how HTML elements can be used
… so I think we should just discourage using it

Matt Garrish: if we're discouraging xml:base, we might as well do same for HTML base to keep some consistency
… no formal warning, but just advice to discourage

Romain Deltour: q_

Romain Deltour: why is the discouraged constructs section not normative?

Matt Garrish: we don't really want to step in and start forbidding things that are in HTML
… just that these HTML things don't make sense in epub, really
… so we say we don't think authors should be using them

Romain Deltour: okay, makes sense

Matt Garrish: probably just an info message in epubcheck or something

Wendy Reid: there was one comment in support of allowing it, but no real rationale provided with that comment

Romain Deltour: do we have any sense of RS support for this element?

Wendy Reid: i've never seen it

Romain Deltour: no, me neither to be honest

Brady Duga: same

Ivan Herman: i've rarely even seen it in HTML

Proposed resolution: Discourage the use of <base> in EPUB, close issue 1699 (Wendy Reid)

Ivan Herman: +1

Matt Garrish: +1

Matthew Chan: +1

Ben Schroeter: +1

Romain Deltour: +1

Masakazu Kitahara: +1

Brady Duga: +1

Toshiaki Koike: +1

Deborah Kaplan: +1

Bill Kasdorf: +1

Wendy Reid: +1

Gregorio Pellegrino: +1

George Kerscher: +1

Resolution #1: Discourage the use of <base> in EPUB, close issue 1699

@iherman iherman removed the Agenda+ Issues that should be discussed during the next working group call. label Jun 23, 2021
@mattgarrish mattgarrish added the EPUB33 Issues addressed in the EPUB 3.3 revision label Jul 22, 2021
@mattgarrish mattgarrish added the Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Topic-ContentDocs The issue affects EPUB content documents
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants