/** * */ public function do_save() { if (isset($this->coords)) { $this->coords = strip_tags($this->coords); $this->coords = preg_replace("/\r/s", "", $this->coords); $this->coords = preg_replace("/\n+/s", "\n", $this->coords); $this->coords = str_replace(" ", " ", $this->coords); $this->coords = html_entity_decode($this->coords); if (!json_decode($this->coords)) { if (strstr($this->coords, 'lat:')) { $this->set_task_from_fs_comp(); } else { if (strstr($this->coords, ';')) { $this->set_task_from_legacy(); } else { if ($this->coords[0] == 1) { $this->set_task_from_html(); } } } } } parent::do_save(); }