public function clean_formatting($xml) { // Insert a space before <s> and <e> then remove formatting $xml = preg_replace('#<[es]>#', ' $0', $xml); return \s9e\TextFormatter\Utils::removeFormatting($xml); }