Feature #17840 ยป rtehtmlarea_bugfix_6821.patch
t3lib/class.t3lib_parsehtml_proc.php (working copy) | ||
---|---|---|
// Add the processed line(s)
|
||
$divSplit[$k] = implode(chr(10),$subLines);
|
||
// If it turns out the line is just blank (containing a possibly) then just make it pure blank:
|
||
if (trim(strip_tags($divSplit[$k]))==' ' && !preg_match('/\<(img)(\s[^>]*)?\/?>/si', $divSplit[$k])) {
|
||
// If it turns out the line is just blank (containing a possibly) then just make it pure blank.
|
||
// But, prevent filtering of lines that are blank in sense above, but whose tags contain attributes.
|
||
// Those attributes should have been filtered before; if they are still there they must be considered as possible content.
|
||
if (trim(strip_tags($divSplit[$k]))==' ' && !preg_match('/\<(img)(\s[^>]*)?\/?>/si', $divSplit[$k]) && !preg_match('/\<([^>]*)?( align| class| style| id| title| dir| lang| xml:lang)([^>]*)?>/si', trim($divSplit[$k]))) {
|
||
$divSplit[$k]='';
|
||
}
|
||
} else { // outside div:
|