Meera S Nair
Meera S Nair

Reputation: 45

how to remove forward slash generated from wordpress editor

I have following html for a wordpress custom plugin which is loaded to a wordpress editor

<div class="container-fluid">
<div class="outer">
<div class="job_details">

But when its saved to a database its changes as follows

<div class=\"container-fluid\">
<div class=\"outer\">
<div class=\"job_details\">

because of this slashes css styles are not getting reflecting. How to remove this slashes?. Please help

Upvotes: 2

Views: 1668

Answers (2)

Gufran Hasan
Gufran Hasan

Reputation: 9373

Please try wp_kses_stripslashes function. This function changes the character sequence \" to just ".

<?php wp_kses_stripslashes( $string ) ?>

Upvotes: 0

abrar
abrar

Reputation: 490

Try this:

stripslashes_deep. <?php wp_editor( stripslashes($content), $editor-id ); ?>

Upvotes: 1

Related Questions