mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-04 03:18:49 +03:00
Cleanup some PHP code
This commit is contained in:
parent
ce63ba506a
commit
8e5d56e15f
3 changed files with 13 additions and 30 deletions
|
|
@ -161,13 +161,11 @@ class Utils
|
|||
public static function ClearHtmlOutput(string $sHtml) : string
|
||||
{
|
||||
// return $sHtml;
|
||||
return \trim(\str_replace('> <', '><',
|
||||
\str_replace('" />', '"/>',
|
||||
\preg_replace('/[\s]+ /i', ' ',
|
||||
\preg_replace('/ [\s]+/i', ' ',
|
||||
\preg_replace('/[\r\n\t]+/', ' ',
|
||||
$sHtml
|
||||
))))));
|
||||
return \preg_replace(
|
||||
['@"\\s*/>@', '/\\s* /i', '/ \\s*/i', '/[\\r\\n\\t]+/', '/>\\s+</'],
|
||||
['">', ' ', ' ', ' ', '><'],
|
||||
\trim($sHtml)
|
||||
);
|
||||
}
|
||||
|
||||
public static function CompileTemplates(array &$aList, string $sDirName, string $sNameSuffix = '')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue