Bug #66138 [Csd->ReO]: HTML parsing breaks in Opera 12 because of an erroneous BASE tag

From: Date: Wed, 04 Dec 2013 18:20:00 +0000
Subject: Bug #66138 [Csd->ReO]: HTML parsing breaks in Opera 12 because of an erroneous BASE tag
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-17350@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66138&edit=1 ID: 66138 Updated by: dm@php.net Reported by: mytskine at gmail dot com Summary: HTML parsing breaks in Opera 12 because of an erroneous BASE tag -Status: Closed +Status: Re-Opened Type: Bug Package: Website problem PHP Version: Irrelevant -Assigned To: bjori +Assigned To: dm Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2013-11-21 22:29:31] mytskine at gmail dot com Sorry if I was wrong about the "index.php" part, I should have been more careful. I had a look at several pages from php.net, and the BASE was always set to the current URL, which doesn't seem much useful. But as I said in the ticket, the problem was that this BASE tag broke the CSS loading with Opera 12.51. The problem appeared once the new theme was enabled. It wasn't a big deal for me as other pages from php.net didn't suffer from this. Thanks for your quick reaction. ------------------------------------------------------------------------ [2013-11-21 18:54:39] bjori@php.net Actually, you are wrong. A <base> tag can totally contain a full URL, including filename.php. All relative links are then resolved against the tag, which include fragments. So links like <a href="#foobar"> will become filename.php#foobar. Removing the filename.php componenent, would then resolve that anchor to /#foobar which is a totally different page. The link you pointed to also very explicitly say URL, which is clearly defined elsewhere, and can ofcourse contain filename.php ------------------------------------------------------------------------ [2013-11-21 17:30:58] bjori@php.net Should be fixed now, thanks for the report! ------------------------------------------------------------------------ [2013-11-21 17:12:25] bjori@php.net Wait, the <base> tag ending in a /foobar.php is actually a problem for Opera? Since when? This part of the website hasn't changed since 2002, maybe 2003... ------------------------------------------------------------------------ [2013-11-21 10:11:54] mytskine at gmail dot com Description: ------------ When loading the page http://php.net/manual/en/ (and possibly others) no CSS is applied with Opera 12. Removing the BASE tag from the header fixes the problem. There are 2 errors in this tag: 1. It should point to a base URL path, yet it ends with "index.php". 2. The tag should not be closed as the doctype isn't xhtml[^1][^2]. An alternative to fixing the tag would be to remove it completly as it is useless (at least on this page). [^1]: <http://www.w3.org/TR/html-markup/base.html> [^2]: <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66138&edit=1

« previous php.webmaster (#17350) next »