Bug #16391
closed[RTE] processing to db - sometimes images are "disappearing" ... (between RTE and database)
0%
Description
WHEN using an RTE, in the context where it is configure to handle the replacment of <p> tag into linebreak ...
THEN the TODB process, Check that the lines is not empty , so it can get rid of it if it the case.
THIS is done with the following implementation :
[TYPO3 CODE]
------------------------------------------------------------------------------------
// If it turns out the line is just blank (containing a possibly) then just make it pure blank:
if (trim(strip_tags($divSplit[$k]))==' ') $divSplit[$k]='';
------------------------------------------------------------------------------------
this become an issue when adding IMAGE to the rte and when that image is the only content of the <p> tag .. In this case the test is TRUE and the all <p> is deleted ...
We have patched the t3lib file :
\t3lib\class.t3lib_parsehtml_proc.php LINE 1283 :
by adding a restriction on the strip_tag function ... in the FUNCTION
divideIntoLines($value,$count=5,$returnArray=FALSE)
I guess there should be other tags allowed , the one that are not holding content .. may be the anchors ? <A NAME> , some more ?
The XCLASSED correction :
// if (trim(strip_tags($divSplit[$k]))==' ') $divSplit[$k]='';
if (trim(strip_tags($divSplit[$k]),'<img>')==' ') $divSplit[$k]='';
(issue imported from #M3905)
Updated by Chris topher over 14 years ago
Could someone move this to the RTE section?
I think that if, than Stan can help here...