Bug #72050

encapsLines duplicates the last line if it is empty

Added by Alexander Stehlik over 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2015-12-03
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

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

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

Expected result: Only one paragraph should be rendered. (<p class="bodytext"> </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.

Associated revisions

Revision b4ed28a7 (diff)
Added by Alexander Stehlik over 3 years ago

[BUGFIX] Prevent duplicate empty lines for encapsLines

When the last line in the text passed to encaps_lineSplit()
is empty a possible duplicate empty line is removed.

Releases: master
Resolves: #72050
Change-Id: I358ae5e1e6e9731d4649add7951c93e62df3bb7e
Reviewed-on: https://review.typo3.org/45111
Reviewed-by: Manuel Glauser <>
Tested-by: Manuel Glauser <>
Tested-by: TYPO3com <>
Reviewed-by: Jan Helke <>
Tested-by: Jan Helke <>

History

#1 Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45111

#2 Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45111

#3 Updated by Gerrit Code Review over 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45111

#4 Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45111

#5 Updated by Alexander Stehlik over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF