mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-23 22:01:47 +01:00
Remove spans with no attributes, they're invisible and can cause invalid XML with linebreaks
This commit is contained in:
parent
b1cd53df74
commit
cc80f295c6
@ -408,7 +408,9 @@ abstract class bo_merge
|
|||||||
'/<(td)( [^>]*)?>((?!<w:t>))(.*?)<\/td>[\s]*?/' => '<$1$2><w:t>$4</w:t></td>',
|
'/<(td)( [^>]*)?>((?!<w:t>))(.*?)<\/td>[\s]*?/' => '<$1$2><w:t>$4</w:t></td>',
|
||||||
'/<(li)(.*?)>(.*?)<\/\1>/' => '<$1 $2>$3</$1>',
|
'/<(li)(.*?)>(.*?)<\/\1>/' => '<$1 $2>$3</$1>',
|
||||||
// Remove extra whitespace
|
// Remove extra whitespace
|
||||||
'/<w:t>[\s]+(.*?)<\/w:t>/' => '<w:t>$1</w:t>'
|
'/<w:t>[\s]+(.*?)<\/w:t>/' => '<w:t>$1</w:t>',
|
||||||
|
// Remove spans with no attributes, linebreaks inside them cause problems
|
||||||
|
'/<span>(.*?)<\/span>/' => '$1'
|
||||||
);
|
);
|
||||||
$content = preg_replace(array_keys($replace_tags),array_values($replace_tags),$content);
|
$content = preg_replace(array_keys($replace_tags),array_values($replace_tags),$content);
|
||||||
//echo $content;die();
|
//echo $content;die();
|
||||||
|
Loading…
Reference in New Issue
Block a user