I am making a plugin and on one of my pages i wanted to use wp editor so i inserted wp editor like this (following codex examples)
<?php
$settings = array(
'wpautop' => false,
'textarea_rows' => 5,
'tinymce' => array( 'plugins' => 'wordpress' )
);
$content = $item['sponsor'];
$editor_id = 'sponsor';
wp_editor( $content, $editor_id, $settings );
?>
but problem is when i use wp editor to add some links like
<a href="http://facebook.com/myurlid"><img src="http://myimagepath" /></a>
wordpress writes that in database but adds trailing slashes to urls like this
<a href=\"http://facebook.com/myurlid\"><img src=\"http://myimagepath\" /></a>
Why does it do that? and any solutions to avoid this?
I found an answer, before submitting a content to database use stripslashes
stripslashes($_POST['sponsor']);