I am saving some text to a setting field for use in an email template.
So the text that is being put into the textarea to save looks like this…
<p>some text <a href="http://www.website.com">[HERE]</a></p>
and after saving it looks like this….
<p>some text <a href="http://www.website.com">[HERE]</a></p>
So what do I need to do to make it remove the \
when I need to work with this data?
UPDATE
I am saving the option/setting with this…
update_option('contact_record_client_template', $post_client_template);
So when I retrieve it with
$client_template = get_option('contact_record_client_template');
I just need to remove the ///
‘s
If I run stripslashes()
on it, it removes 2 of the 3 /
‘s so it still leaves 1.
I also tried using str_replace( '///', '', $value );
but it just seems to add more or do nothing
You can change the
"
signs to"
automatically using PHP’shtmlspecialchars()
prior to yourupdate_option()
call:If you need to change
'
characters as well, use this: