/** * Cleans input from data removing invalid HTML tags such as scripts * * @param string $input * * @return mixed */ protected function clean($input) { if ($input) { $cleaned = Purify::clean($input); return $cleaned; } return NULL; }
/** * Cleans the specified input. * * @param array|string $input * * @return array|string */ public function clean($input) { return Purify::clean($input); }
public function testCleanDoNotMergeConfig() { $settings = ['HTML.ForbiddenElements' => 'p']; $cleaned = Purify::clean($this->testInput, $settings, false); $this->assertEquals('Test', $cleaned); }