Saturday, 25 May 2013

Removing \\\ from Saved Data

Removing \\\ from Saved Data

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

No comments:

Post a Comment