[wp-trac] [WordPress Trac] #13354: wp_insert_post() not working correctly (was: wp_insert_pos not working correctly)

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 25 15:31:32 UTC 2010


#13354: wp_insert_post() not working correctly
-----------------------------+----------------------------------------------
 Reporter:  christian_gnoth  |        Owner:            
     Type:  defect (bug)     |       Status:  closed    
 Priority:  high             |    Milestone:            
Component:  General          |      Version:  2.9.2     
 Severity:  major            |   Resolution:  worksforme
 Keywords:  2nd-opinion      |  
-----------------------------+----------------------------------------------
Changes (by mfields):

 * cc: michael@… (added)
  * keywords:  wp_insert_post, post_content, 255 characters => 2nd-opinion
  * status:  reopened => closed
  * resolution:  => worksforme


Comment:

 I logged in a administrator and ran the following test to determine
 whether the post_content would be cut off at 255 characters. This did not
 happen. As for the removal of the onclick attribute, it was not removed
 via kses.

 {{{
 add_action( 'admin_head', 'create_gangsta_page' );
 function create_gangsta_page() {
         wp_insert_post( array(
                 "post_author" => 1,
                 "post_title" => '1234 5678 9 This is just a test post',
                 "post_status"=>"publish",
                 "post_type" => "page",
                 'post_content' => "<p>For sure <a onclick=\"window.open('
 https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/Marketing/popup
 /OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no,
 directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes,
 width=400, height=350');\" href=\"#\">ipsizzle dolor</a> black amizzle,
 mah nizzle adipiscing elit. Fo shizzle go to hizzle velit, away
 volutpizzle, suscipizzle check out this, gravida vizzle, <a href='#'
 onclick='return false;'>arcu</a>. Dizzle cool tortizzle. Sed erizzle.
 Fusce at dolor dapibus turpis tempus check it out. Maurizzle pellentesque
 shut the shizzle up go to hizzle turpizzle. Fizzle check out this tortor.
 Pellentesque dope rizzle nisi. In hac habitasse for sure dictumst. The
 bizzle dapibus. Things tellizzle urna, pretium mammasay mammasa mamma oo
 sa, mattizzle ac, crazy pizzle, nunc. Bow wow wow suscipizzle. Integizzle
 semper velit <a href='http://google.com'>sizzle own yo'</a>. Donizzle yo
 mamma auctor maurizzle. Phasellus a elizzle ut mah nizzle gangsta
 tincidunt. Maecenas fo shizzle my shizz. Vestibulum izzle lacizzle doggy
 sure elementum break yo neck, yall. Nunc at dawg sizzle amet eros pimpin'
 porta. Mofo velizzle tortor, ultricizzle shiz, hendrerizzle quis, things,
 check it out. Etiam velit dope, aliquizzle consequat, tellivizzle ass,
 dictizzle fo shizzle mah nizzle fo rizzle, mah home g-dizzle, turpizzle.
 Its fo rizzle neque. Rizzle lorizzle. Phat vitae erat ut libero shizznit
 doggy. Fusce gangster augue eu nibh cool mattizzle. Phasellizzle
 fermentizzle sapien nizzle own yo'. Suspendisse lorem leo, sollicitudin
 sizzle, shizzle my nizzle crocodizzle izzle, commodo nec, justo. Donizzle
 i'm in the shizzle porttitor mah nizzle. Nunc feugizzle, crunk pot hizzle
 bow wow wow, sapizzle tellivizzle tincidunt pizzle, egizzle dapibus pede
 enim izzle izzle. Phasellizzle fo shizzle my nizzle leo, mah nizzle izzle,
 tempizzle izzle, semper izzle, crackalackin. Ut boom shackalack magna
 vizzle ipsum. Shizznit gizzle my shizz, phat vitae, vestibulum et,
 rutrizzle ma nizzle, velizzle. Maurizzle go to hizzle mauris. Sizzle
 sizzle magna sit dope risus iaculizzle fo shizzle my nizzle.</p>' END"
         ) );
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13354#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list