# Escaping quotes from post

**URL:** https://forum.kirupa.com/t/escaping-quotes-from-post/250705
**Category:** Uncategorized
**Created:** [January 31, 2008, 6:46pm UTC](https://forum.kirupa.com/t/escaping-quotes-from-post/250705 "2008-01-31T18:46:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![susancbk](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@susancbk](https://forum.kirupa.com/u/susancbk)
#### Post date: [January 31, 2008, 6:46pm UTC](https://forum.kirupa.com/t/escaping-quotes-from-post/250705/1 "2008-01-31T18:46:09Z")

</div>

in a textbox i enter this :

> testing’s and “testing”

then when I retrieve it from POST i get this :

> testing's "testings"

Obviously I need to get rid of those slashes, so I try this

```auto

$emailMessage = str_replace("\'","[]",$emailMessage);
$emailmessage = str_replace("\"","[[]]",$emailMessage);

```

where later I can replace the and [] back with single and double quotes  
it works with the single quotes , but not the double quotes… here’s what I get…

> testings "testings"

any ideas?
