Make WordPress Core

Opened 8 years ago

Last modified 7 years ago

#40191 new defect (bug)

Multiline post content with `<` as first character becomes malformed

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Formatting Keywords:
Focuses: Cc:

Description

Create a page/post with the following content:

< Hello
< Hello
< Hello

View the post, and post_content becomes:

< Hello < Hello < Hello

Change History (2)

#1 @johnjamesjacoby
8 years ago

I've narrowed it down to:

  • wpautop()
  • wp_replace_in_html_tags()
  • wp_html_split()
  • get_html_split_regex()

Something is up with how get_html_split_regex() identifies HTML tags.


< 1
< 2
< 3

gets treated differently than:

> 1
> 2
> 3

#2 @soulseekah
7 years ago

That is not valid HTML. &lt; should be used.

Related #39153

Note: See TracTickets for help on using tickets.