Bug #17591

<base> tag produces text selection problems in IE6

Added by Christian Welzel over 13 years ago. Updated over 2 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


The usage of the short form of the <base> tag causes text selection errors in IE6 if the layout uses floated elements. This leads to the problem, that the visitor cannot select text from the webpage by using the mouse. Either nothing or the whole page is selected.
This is caused by the short form of base tag (<base ... />).
Adding the closing tag fixes the problem.
So please change the occurances of the base tag to <base ...></base>.

(issue imported from #M6301)

Related issues

Related to TYPO3 Core - Bug #17523: Property config.baseUrl and it's current construct may be incompatible with ExplorerClosedChris topher2007-08-11

Has duplicate TYPO3 Core - Bug #19401: Problem with Base HrefClosed2008-10-01


Updated by Dmitry Dulepov over 13 years ago

Request declined because it violates HTML specification, namely part 12.4, which says:

12.4 Path information: the BASE element
<!ELEMENT BASE - O EMPTY               -- document base URI -->
  href        %URI;          #REQUIRED -- URI that acts as base URI --

Start tag: required, <b><u>End tag: forbidden</u></b>

Reference: http://www.w3.org/TR/html401/struct/links.html#h-12.4


Updated by Christian Welzel over 13 years ago

Then Typo3 currently violates exactly this rule.
It generates the base tag as <base /> which means that the base tag
has an end tag (following xml spec
http://www.w3.org/TR/2006/REC-xml-20060816/#sec-starttags) although
the element is empty. And empty elements can be written with an <tag/>
or <tag></tag> following above spec.

For strict html 4.01 compliance the base tag had to be <base href="...">
without any slashes.


Updated by Dmitry Dulepov over 13 years ago

Nope. Closing tag means exactly what you propose: </base>. But <base ... /> is allowed. See here: http://www.w3.org/TR/xhtml1/#C_2

Do not refer to xml while working with html. This is not the same.


Updated by Georg Leitner over 13 years ago

See: CSS-bugs with IE 6 http://drupal.org/node/44934

<base href="http://example.org/"><!--[if IE]></base><![endif]-->

Updated by Loredana Zeca over 12 years ago

I had the same problem on IE6 with googlemaps, that couldn't be displayed anymore.
In fact, I had an error like that:
"Internet Explorer couldn't open the site
Operation aborted"

After some researches, I discovered this problem on googlemap forum:

It is a problem due to the tags closed uncorrectly, and more specifically the tag <base>.

So, I don't know if there is already a patch for this problem, but you can see here my solution:

1). class "tslib_pagegen.php": line 488

I replaced this line:
<base href="'.htmlspecialchars($GLOBALS['TSFE']->baseUrl).'" />';*/

with this one
<base href="'.htmlspecialchars($GLOBALS['TSFE']->baseUrl).'"></base>';

2). class "tslib_fe.php": line 1393

I replaced this line:
$replacement = chr(10) . '<base href="' . htmlentities($base) . '" />' . chr(10);
with this one
$replacement = chr(10) . '<base href="' . htmlentities($base) . '" ></base>' . chr(10);

I hope this help


Updated by Dmitry Dulepov over 12 years ago

Sorry, guys, we can't violate the spec because of a bug in the old browser.

Use can TS conditions to solve the problem:

[browser = msie][version < 7]
page.headerData.100 = TEXT
page.headerData.100 = <base href="http://example.com/"></base>
config.baseTag = http://example.com/


Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF