Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#44359 closed defect (bug) (invalid)

html tag in post

Reported by: albedo0's profile albedo0 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

Hi,

If you try to save a post with the <html> tag or &lt;html&gt;, vous have an error and you are redirect to a non found page.

I find this problem in two separated installation of WordPress multisite version 4.9.6.

Thanks

Change History (8)

#1 follow-up: @subrataemfluence
6 years ago

Would you mind sharing the steps to reproduce the issue?
Thank you!

#2 @subrataemfluence
6 years ago

  • Keywords reporter-feedback added

#3 follow-up: @ianbelanger
6 years ago

Hi @albedo0,

I believe that you are running into an issue because a valid HTML Document is only allowed 1 <html>, 1 <head> and 1 <body> tag and browsers may have a hard time displaying the DOM with more than 1 of any of those.

#4 in reply to: ↑ 1 @albedo0
6 years ago

Replying to subrataemfluence:

Would you mind sharing the steps to reproduce the issue?
Thank you!

I just write an html tag in a post like <html> or &lt;html&gt;

#5 in reply to: ↑ 3 @albedo0
6 years ago

Replying to ianbelanger:

Hi @albedo0,

I believe that you are running into an issue because a valid HTML Document is only allowed 1 <html>, 1 <head> and 1 <body> tag and browsers may have a hard time displaying the DOM with more than 1 of any of those.

Yes, i know but i write post about HTML, so to speak about HTML structure i need to write the html tag like &lt;html&gt; usually.

#6 @albedo0
6 years ago

I have to say that to track the problem, i already try to disable all my plugins...

#7 follow-up: @desrosj
6 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version 4.9.6 deleted

Hi @albedo0,

Thanks for the ticket, and welcome to Trac!

The <html>, <head>, and <body> tags are not allowed in the editor and are purposefully stripped from post content. If you are looking to include code examples in your posts, you should look into wrapping the markup in <code> or <pre> tags. Pasting code examples into these tags using the visual editor will automatically escape the markup into &lt;html&gt;.

#8 in reply to: ↑ 7 @albedo0
6 years ago

I know that the html tag is escaped into &lt;html&gt;, it's what i need, but the problem is that i can not save the post when i have &lt;html&gt; in it !

Replying to desrosj:

Hi @albedo0,

Thanks for the ticket, and welcome to Trac!

The <html>, <head>, and <body> tags are not allowed in the editor and are purposefully stripped from post content. If you are looking to include code examples in your posts, you should look into wrapping the markup in <code> or <pre> tags. Pasting code examples into these tags using the visual editor will automatically escape the markup into &lt;html&gt;.

Note: See TracTickets for help on using tickets.