try to put this code before replace text in string
inside if( !empty( $_POST['scembed'] ) ) {
$_POST['scembed'] = stripslashes( $_POST['scembed'] );
Note
problem occuring because your quote are escaped in string, so ” becomes \”
try to put this code before replace text in string
inside if( !empty( $_POST['scembed'] ) ) {
$_POST['scembed'] = stripslashes( $_POST['scembed'] );
Note
problem occuring because your quote are escaped in string, so ” becomes \”