You will have to escape data yourself, as it's coming from URL and anyone can append anything malicious.
$id = $this->getRequest()->getParam('id');
if(is_numeric($id)) {
//do your stuff
} else {
//id is not numeric, be cautious
}
To escape html, you can use
Mage::helper('core')->htmlEscape('html here');
UPDATE:
No, Magento doesn't escape it for you.
public function setData($key, $value=null)
{
$this->_hasDataChanges = true;
if(is_array($key)) {
$this->_data = $key;
$this->_addFullNames();
} else {
$this->_data[$key] = $value; //check this...
if (isset($this->_syncFieldsMap[$key])) {
$fullFieldName = $this->_syncFieldsMap[$key];
$this->_data[$fullFieldName] = $value;
}
}
return $this;
}