mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
strip CDATA from title. Props pgarrett and mdawaffe. fixes #879
git-svn-id: http://svn.automattic.com/wordpress/trunk@4150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
64a2c6bdf1
commit
241d0e8f11
@ -38,7 +38,7 @@ class RSS_Import {
|
|||||||
$index = 0;
|
$index = 0;
|
||||||
foreach ($this->posts as $post) {
|
foreach ($this->posts as $post) {
|
||||||
preg_match('|<title>(.*?)</title>|is', $post, $post_title);
|
preg_match('|<title>(.*?)</title>|is', $post, $post_title);
|
||||||
$post_title = $wpdb->escape(trim($post_title[1]));
|
$post_title = str_replace(array('<![CDATA[', ']]>'), '', $wpdb->escape( trim($post_title[1]) ));
|
||||||
|
|
||||||
preg_match('|<pubdate>(.*?)</pubdate>|is', $post, $post_date_gmt);
|
preg_match('|<pubdate>(.*?)</pubdate>|is', $post, $post_date_gmt);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user