Issue Bug Closed

#72050encapsLines duplicates the last line if it is empty

Alexander Stehlik 12/03/15, 16:04 updated 10/02/18, 11:26

Description

Testcase: Create a content element with a single empty <p>&nbsp;</p> in the RTE.

Result: Two paragraphs are renderd in the Frontend (<p class="bodytext">&nbsp;</p><p class="bodytext">&nbsp;</p>)

Expected result: Only one paragraph should be rendered. (<p class="bodytext">&nbsp;</p>)

Cause: In the encapsLines functionality the string is splitted by \n. When you have only one \n without any content before or after it, explode() will get you two empty items that are treated as lines.

Reviews 1