Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#1965 closed defect (bug) (wontfix)

CDATA sections not recognized when editing

Reported by: elharo's profile elharo Owned by:
Milestone: Priority: normal
Severity: trivial Version: 1.5.2
Component: Administration Keywords:
Focuses: Cc:


I tried to use a CDATA section when editing a new post. e.g.

Blah blah blah.

<![CDATA[some text that includes various unescaped less than signs < ]]>

blah blah.

WordPress made a hash out of this. It neither completely stripped the CDATA section delimiters nor left them intact. It added a space after the less than sign that begins the CDATA section.

This looks like intentional behavior, but it strikes me as a bug. I should be able to use CDATA sections when editing, but if they are removed, they should be removed in toto and their contents escaped.

Change History (2)

#1 @davidhouse
17 years ago

  • Severity changed from normal to trivial

Hardly anyone uses CDATA.

#2 @mdawaffe
16 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

WordPress should encode everything such that you do not have to use CDATA. WordPress does not respect CDATA blocks anyway.

You should be able to do what you want by using a plugin to manage the filters for content_save_pre. Also chechk out "WordPress should correct invalidly nested XHTML automatically" under Options->Writing.

Note: See TracTickets for help on using tickets.