zend-developer-tools icon indicating copy to clipboard operation
zend-developer-tools copied to clipboard

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

Open ghost opened this issue 6 years ago • 1 comments

  • [x] I was not able to find an open or closed issue matching what I'm seeing.
  • [x] 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.

ghost avatar Jan 01 '19 03:01 ghost

This repository has been closed and moved to laminas/laminas-developer-tools; a new issue has been opened at https://github.com/laminas/laminas-developer-tools/issues/1.

weierophinney avatar Dec 31 '19 22:12 weierophinney