Make WordPress Core

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#2075 closed defect (bug) (invalid)

Breaking post content

Reported by: michele Owned by:
Priority: high Milestone:
Component: General Version: 1.5.2
Severity: normal Keywords:
Cc: Focuses:

Description

Wordpress breaks a post if the content is the following:

<blockquote>

<code><div></code>
<code><ul></code>
<code><li><a href="/">home</a></li></code>
<code><li><a href="/about/">about</a></li></code>
<code><li><a href="/services/">services</a></li></code>
<code><li><a href="/work/">portfolio</a></li></code>
<code></ul></code>
</code></div></code>

</blockquote>

When you save it, it becomes:

<blockquote>

<code><div></div></code>
<code><ul></ul></code>
<code><li><a href="/">home</a></li></code>
<code><li><a href="/about/">about</a></li></code>
<code><li><a href="/services/">services</a></li></code>
<code><li><a href="/work/">portfolio</a></li></code>
<code></code>


</blockquote>

Change History (3)

#1 @michele
21 years ago

  • Component Administration → General
  • Priority normal → high

#2 @skeltoac
21 years ago

  • Resolution → invalid
  • Status new → closed

The markup you posted is invalid and WP correctly closed those tags within the code blocks.

Go to ​http://validator.w3.org/fragment-upload.html and paste your markup to see the exact errors.

If you want to display the text "<div>" you must encode the "<" as "&lt;". Otherwise it's markup and it must be properly nested.

#3 @skippy
21 years ago

Use &amp;lt; and &amp;gt; instead of the angle brackets.

Note: See TracTickets for help on using tickets.