Project

General

Profile

Actions

Bug #17319

closed

Several bugs when writing HTML entities and tags inside of RTE

Added by Clemens Cap over 17 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-05-20
Due date:
% Done:

0%

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

Description

The concept of parsing and modifying the input of the RTE is completely broken at one point, making it essentially impossible to write a text on html inside of Typo3.

1) Using the RTE in WYSIWYG Mode and typing the usual tag open and tag closed brackets directly from keyboard.

Storing this after the edit produces in the browser of the page the anchortext as text and an empty anchor without a href and without an anchor attribute with a seemingly artificial id of c163.

Reopening the page in the editor produces a yellow marker claiming an incorrect anchor.

In my opinion, this is incorrect behaviour, since in WYSIWYG mode the system should understand that a tag open bracket has a different meaning than in HTML Mode.

2) Using the RTE in TEXT (HTML) Mode and typing with the Insert Special Character feature seemed the next logical solution.

First, the special character feature did not offer brackets conforming in size and form to the usual size and form just smaller ones (ie. lsaquo and rsaquo entities). So I kind of tried to settle with those, to no avail.

Second, the lsaquo and rsaquo characters show up correctly in the RTE in WYSIWYG mode but in TEXT (HTML) mode they still show up as small brackets and not in their entity encoding lsaquo and rsaquo, which I find weird and inconsistent (they should show up as HTML entities in HTML mode).

Third, when rendering this and looking at the result in the browser, I just get question marks. (Not, it is not an incorrect encoding in the browser, typo 3 in fact generates the questions marks, easy to verify in a packet sniffer and in view source).

In my opinion, this is just plainly weird behaviour here.

3) Using the RTE in TEXT (HTML) Mode I entered the HTML entities lt and gt for the brackets (yes, I used the ampersand and the semicolon, but I do not want to run into similar problems in the forum here...)

It showed up correctly, when switching the RTE back to WYSIWYG mode. In the browser it produces the same results as in 1) - upon store - as well as upon a second edit open and store (ie. the yellow link complaint).

So, first, I believe there are some bugs in the RTE and preparsing concept here and second, I do not know how to write a simple text containing some brackets in text mode short of trying the pure HTML feature. This IS text, I am selecting the proper mode, and it does nto work.

  • This is Typo3 4.1 serving from Redhat 3
  • Client browser is Netscape 1.7.5 Mozilla/5.0 running on Win XP
  • style.content.links.allowTags contains the a tag
    (issue imported from #M5659)

Files

rtehtmlarea_bugfix_5659.patch (1.89 KB) rtehtmlarea_bugfix_5659.patch Administrator Admin, 2008-02-07 06:27

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #16341: Entities entered in wysiwyg are decoded and therefore gone when toggling to html source or savingClosedStanislas Rolland2006-07-12

Actions
Actions #1

Updated by Marc Wöhlken over 17 years ago

Same problem here.

Comparing RTE input, HTML-Content, RTE rendering (BE) and DB content one can get an impression of what's going wrong:

Step 1
RTE input: <h1>heading</h1>
HTML Content: <h1>heading</h1>

Everything's fine. Save.

Step 2:
DB content: <h1>heading</h1>
HTML content: <h1>heading</h1>
RTE-Rendering: <h1>heading</h1>

The rendering is obviously wrong, should be <h1>heading</h1>
Save again.

Step 3.
DB content: <h1>heading</h1>
HTML content: <h1<heading</h1>
RTE rendering: A heading with text "heading"

Conclusion:
A problem appeared at step 2. HTML content is correct but the RTE rendering is wrong. On save all entities will be converted to corresponding chars.

Actions #2

Updated by Stanislas Rolland almost 17 years ago

I would think that if you use htmlArea RTE 1.5.4+ (it would probably work also with older versions) and if you use the default processing options (that is: if you do not override any part of RTE.default.proc in Page TSConfig), then all you need to do is add the following two lines to Page TSConfig:

RTE.default.proc.dontUndoHSC_db = 1
RTE.default.proc.dontHSC_rte = 1

Then you should be able to enter html code in wysiwyg mode and it should be rendered correctly in the RTE and in the frontend (assuming CSS Styled Content).

Actions #3

Updated by Stanislas Rolland almost 17 years ago

FIxed in SVN TYPO3core branches trunk and TYPO3_4-2

Actions

Also available in: Atom PDF