stripslashes not working?
Posted: Tue Oct 24, 2006 11:45 am
I have a method like this in my application model:
It's used to escape data for output to the page, but even though I'm using this... the data comes out like this... (with the slashes still there)
I checked to make sure the data wasn't double backslashed in the data, and it isn't. What could be the cause of this?
Code: Select all
public function getSafe($key){
if(array_key_exists($key, $this->_fields)){
return htmlentities(stripslashes($this->_fields[$key]->getValue()));
}
return null;
}Code: Select all
<div class="member_list">
<h1>Luke\'s House</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean cursus dolor id neque. Vestibulum lobortis luctus augue. Nunc velit. Fusce ultrices massa nec felis. Quisque ut justo. Nulla auctor ornare lorem. Nunc sit amet eros. Phasellus ultricies est </p>
</div>