[wp-trac] [WordPress Trac] #2813: <br /> tags are not handled
correctly when posted via xml-rpc
WordPress Trac
wp-trac at lists.automattic.com
Sat Jun 10 18:25:14 GMT 2006
#2813: <br /> tags are not handled correctly when posted via xml-rpc
-----------------------+----------------------------------------------------
Id: 2813 | Status: new
Component: XML-RPC | Modified: Sat Jun 10 18:25:14 2006
Severity: normal | Milestone: 2.0.3
Priority: normal | Version: 2.0.2
Owner: anonymous | Reporter: pidge
-----------------------+----------------------------------------------------
A few things happens when posting a well formed valid xhtml content via
xml-rpc.
1. <br/> tags are converted to <br>
2. When publishing WP appends extra <br/> (actually <br>) tags even if the
post is a well formed validated xhtml content.
To reproduce, compose a simple entry with a <br/> using a client editor
(in our case, we used our application - Zoundry). The xhtml content looks
like:
{{{
<p>Hello
<br />
Worlds</p>
}}}
Debug logs shows that the xml-rpc description field is as expected:
{{{
<p>Hello
<br/>
Worlds</p>
}}}
Next, go into the WP MySQL database and look at the posted content:
In, WP 2.0, noticed that the <br/> is converted to <br>. E.g.:
{{{
<p>Hello
<br>
Worlds</p>
}}}
I found that this is due to a bug in kses.php. It seems this part (<br/>
converted to <br>) is resolved in WP 2.0.1. That is, the database content
is:
{{{
<p>Hello
<br/>
World</p>
}}}
When the above content is published via WP, the html in the published
entry inserts two extra <br> tags and also note that the <br/> is
converted to a non-valid <br> tag (possibly a bug in wpautop):
{{{
<p>Hello<br>
<br><br>
World</p>
}}}
This applies to WP 2.0 and 2.01 (verified) and users have reported same
issue in WP 2.02.
--
Ticket URL: <http://trac.wordpress.org/ticket/2813>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list