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

In HTML5, the <head> element can be omitted. The zend-developer-tools css requires it. #1

Closed
2 tasks done
weierophinney opened this issue Dec 31, 2019 · 1 comment · Fixed by #31
Closed
2 tasks done

Comments

@weierophinney
Copy link
Member

  • I was not able to find an open or closed issue matching what I'm seeing.
  • This is not a question. (Questions should be asked on chat (Signup here) or our forums.)

Provide a narrative description of what you are trying to accomplish.

Code to reproduce the issue

In HTML5, the <head> element can be omitted. The following code will validate as HTML5:

<!DOCTYPE html>
<html>
<title>Title of the document</title>

<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>

</html>

However, ZendDeveloperTools\Listener->injectToolbar() requires it to work

$injected = preg_replace('/<\/head>/i', $style . "\n</head>", $injected, 1);

Expected results

Styles should be displayed in the html document even if there is no <head> html element when the document is html 5 document.

Actual results

html document does not include zend-developer-tools required css, if <head> element is missing from the layout.


Originally posted by @VilleTikkanen at zendframework/zend-developer-tools#255

@samsonasik
Copy link
Member

@VilleTikkanen I've created PR #31 for it.

samsonasik added a commit that referenced this issue Nov 2, 2020
Fixes #1 : Toolbar should be displayed even without <head> in HTML5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants