Project

General

Profile

Actions

Bug #14261

closed

XHTML cleaning breaks base tag

Added by Simon Child over 20 years ago. Updated over 20 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2004-08-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.6.2
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

XHTML Cleaning adds an end tag to the base tag, but the specification forbids this:

http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4

Surprisingly validator.w3.org still validates the page as alright, but perhaps this is a bug/weakness in the validator

(issue imported from #M262)

Actions #1

Updated by Ingmar Schlecht over 20 years ago

So do I get you right that Typo3 in fact produces something like this?
<base href="asdf"></base>

I think that's caused by the $soloTags variable in class t3lib_parsehtml containing only 'br,hr,img,input,area' but not 'base'. So the solution would be to add 'base' to the list of solo tags.

Actions #2

Updated by Simon Child over 20 years ago

xhtml cleaning changed

<base href="http://www.mydomain.com&quot;>

to

<base href="http://www.mydomain.com&quot; />

which is invalid according to

http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4

It states "Start tag: required, End tag: forbidden" and their example of valid code is:

<BASE href="http://www.aviary.com/products/intro.html&quot;>

and not

<BASE href="http://www.aviary.com/products/intro.html&quot; />

or

<BASE href="http://www.aviary.com/products/intro.html&quot;&gt;&lt;/base>

Actions #3

Updated by Ingmar Schlecht over 20 years ago

You should disable xhtml_cleaning if you want HTML instead of XHTML.

In XHTML the correct base tag looks like this:
<base href="http://www.mydomain.com&quot; />

In HTML it looks like this:
<base href="http://www.mydomain.com&quot;>

So it's no wonder Typo3 corrected this if you enabled XHTML cleaning.

Actions

Also available in: Atom PDF