Thanks alot, this was my problem also and causing problems with shortcodes. However, your code above may not be correct? The codex page you reference has a different str_replace which includes: &-g-t-; – which I can’t make appear in this post, it gets stripped out, probably as it did in your post.