public function filterData($data)
 {
     if (!empty($data['text'])) {
         $model = new EditHubModel();
         $data['text'] = strip_tags($data['text'], $model->getAllowedTags());
     }
     if (!empty($data['imageLink'])) {
         $data['imageLink'] = $this->addProtocolToLink($data['imageLink']);
     }
     return parent::filterData($data);
 }
 public function filterData($data)
 {
     $data = parent::filterData($data);
     $boxesCount = $this->getModel()->getBoxesCount();
     for ($i = 1; $i <= $boxesCount; $i++) {
         if (!empty($data[self::FIELD_NAME_URL . $i])) {
             $data[self::FIELD_NAME_URL . $i] = $this->addProtocolToLink($data[self::FIELD_NAME_URL . $i]);
         }
         if (!empty($data[self::FIELD_NAME_USERSURL . $i])) {
             $data['usersUrl' . $i] = $this->addProtocolToLink($data[self::FIELD_NAME_USERSURL . $i]);
             // get Wiki URL
             $parsedUrl = parse_url($data[self::FIELD_NAME_USERSURL . $i]);
             $data['wikiUrl' . $i] = $parsedUrl['host'];
             $userName = UserService::getNameFromUrl($data[self::FIELD_NAME_USERSURL . $i]);
             if ($userName !== false) {
                 $data['UserName' . $i] = $userName;
             }
         }
         if (!empty($data[self::FIELD_NAME_QUOTE . $i])) {
             $model = new EditHubModel();
             $data[self::FIELD_NAME_QUOTE . $i] = strip_tags($data[self::FIELD_NAME_QUOTE . $i], $model->getAllowedTags());
         }
     }
     return $data;
 }