Project

General

Profile

Actions

Bug #85496

closed

CE Special/HTML deletes and replaces text in bodytext

Added by Hagen Gebauer over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-07-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

After upgrading from 7LTS to 8LTS, in the backend form all lines in bodytext of CEs of type HTML were wrapped in additional paragraph tags and HTML tags were displayed as HTML entities (>/<)

When copying the original HTML back in and saving, lots of stuff got deleted:
  • script tags
  • input tags
  • label tags
  • line breaks

Additionally some CSS classes got replaced (I was using classes “js” and “nojs” which have both been replaced by a class “cite”.

Like this the CE HTML is not usable anymore as it seems it can’t do more than a normal bodytext field which is HTML anyway. I couldn’t find any note about that anywhere.

Actions #1

Updated by Stephan Großberndt over 6 years ago

  • Status changed from New to Needs Feedback

Did this happen when executing the upgrade wizards? If yes, could you check, which upgrade wizard? Is it possible there are <link ... occurrences in the html code?

Actions #2

Updated by Stephan Großberndt over 6 years ago

I suspected the RteLinkSyntaxUpdater might fail but it works correctly by transforming

<script type="text/javascript">alert(1)</script>
<link attr="value">Content</link>

to

<script type="text/javascript">alert(1)</script>
<a href="t3://page?alias=attr=&quot;value&quot;">Content</a>

Is it possible this happens due to some extension?

Actions #3

Updated by Hagen Gebauer over 6 years ago

Stephan Großberndt wrote:

Did this happen when executing the upgrade wizards? If yes, could you check, which upgrade wizard? Is it possible there are <link ... occurrences in the html code?

I don’t believe it has anything to do with the upgrade wizards since those records I haven’t manually changed yet are still correctly stored in the database but displayed incorrectly in the backend form. Only when I paste HTML into the field and save it, the mentioned replacements and deletions happen. I have not used <link>

Pasting this

<script type="text/javascript" src="/path/to/file.min.js"></script>
<span class="js" style="display:none;">
  <input type="checkbox" name="xyz" id="xyz-ab" checked>
  <label for="xyz-ab"></label>
</span>

was, on saving, turned into

<p> <span class="js" style="display:none;">       </span> </p>

with the paragraph tag not being stored in the database but displayed in the backend form.

In a live case the class “js” got replaced by “cite” which didn’t happen this time.

Actions #4

Updated by Hagen Gebauer over 6 years ago

Stephan Großberndt wrote:

Is it possible this happens due to some extension?

Thanks for this hint. The reason was indeed an extension which provides additional content elements. Deactivating this extension results in the HTML CEs working as they always have been. However, I don’t really see how such extension is able to interfere with other content elements. If I’ll find anything I’ll post it here. And if you have a hint on that, too, I’d be very grateful.

Actions #5

Updated by Georg Ringer over 6 years ago

  • Status changed from Needs Feedback to Closed

I am closing this issue because cause was a 3rd party extension

Actions

Also available in: Atom PDF