public function onBeforeWrite() { if ($this->MapEmbedHTML) { $this->MapEmbedHTML = preg_replace('/\\s(width|style|height|frameborder)=".*?"/i', '', $this->MapEmbedHTML); } return parent::onBeforeWrite(); }