Skip to content

Unexpected warning "plain text isn't allowed in head elements" under --show-body-only yes #314

@benkasminbullock

Description

@benkasminbullock

Given the following HTML,

fruit cakes
<p>Christmas cakes</p>

the command

./tidy --show-body-only yes --quiet yes ~/goo.html 

produces output

line 2 column 1 - Warning: plain text isn't allowed in <head> elements
line 2 column 1 - Info: <head> previously mentioned
fruit cakes
<p>Christmas cakes</p>

The initial warning seems very odd to me. Adding a body tag makes no difference and also generates another error:

fruit cakes
<body>
<p>Christmas cakes</p>
</body>

gives

line 2 column 1 - Warning: plain text isn't allowed in <head> elements
line 2 column 1 - Info: <head> previously mentioned
line 3 column 1 - Warning: discarding unexpected <body>
fruit cakes
<p>Christmas cakes</p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions