Project

General

Profile

Actions

Bug #80985

closed

RTE: External links with & are broken because & converted to & (ckeditor and rtehtmlarea)

Added by Alex Kellner about 7 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2017-04-24
Due date:
% Done:

100%

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

Description

We're using rtehtmlarea from TER in a project together with TYPO 8.7.1. But the problem also occurs with ckeditor.
If an editor adds a new link with the wizard (e.g. in tt_content.bodytext) like

http://domain.org/?id=1&foo=bar

The link gets converted in database into

http://domain.org/?id=1&foo=bar

The link is also rendered in this way in frontend and this is wrong.

In the past in TYPO3 7.6 it was stored with & - in 8.7 links seems to be "htmlspecialchared".


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #25823: tslib_cObj::typoLink() geneates invalid linksClosed2011-04-07

Actions
Related to TYPO3 Core - Bug #89264: Mailto links in RTE cannot use ampersand to add further arguments like subject=foo&body=barClosed2019-09-25

Actions
Has duplicate TYPO3 Core - Bug #81152: CKEditor breaks links with parameterClosed2017-05-05

Actions
Actions #1

Updated by Alex Kellner almost 7 years ago

Our quick workarround (maybe others also need that) is to use htmlspecialchars_decode() on link rendering:

lib.parseFunc_RTE {
    tags.a.typolink {
        parameter.HTMLparser = 1
        parameter.HTMLparser {
            htmlSpecialChars = -1
        }
    }
}

Actions #2

Updated by Riccardo De Contardi almost 7 years ago

  • Category set to RTE (rtehtmlarea + ckeditor)
Actions #3

Updated by Xavier Perseguers almost 7 years ago

  • Has duplicate Bug #81152: CKEditor breaks links with parameter added
Actions #4

Updated by Benni Mack almost 7 years ago

Hey Alex,

wow. thanks for the info and the workaround. So this means the data is stored correctly in the DB but not rendered correctly in the output? Could you give me the snippet that is stored in the database?

Actions #5

Updated by Martin W. almost 7 years ago

Benni Mack wrote:

Hey Alex,

wow. thanks for the info and the workaround. So this means the data is stored correctly in the DB but not rendered correctly in the output? Could you give me the snippet that is stored in the database?

Hi Benni!
Same problem here, workaround works and we have the correct link in the RTE, in the DB it's stored with & and same was displayed in the frontend before the workaround.
So it's like Alex described above.

Actions #6

Updated by Benni Mack almost 7 years ago

  • Related to Bug #25823: tslib_cObj::typoLink() geneates invalid links added
Actions #7

Updated by Benni Mack almost 7 years ago

Does it affect all links (internal, page links with additional parameters) or just external links?

Actions #8

Updated by Robert Vock almost 7 years ago

Internal links are not affected.

Actions #9

Updated by Gerrit Code Review almost 7 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/53268

Actions #10

Updated by Gerrit Code Review almost 7 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/53268

Actions #11

Updated by Gerrit Code Review almost 7 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/53268

Actions #12

Updated by Gerrit Code Review almost 7 years ago

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

Actions #13

Updated by Benni Mack almost 7 years ago

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

Updated by Patrick Lenk about 6 years ago

Robert Vock wrote:

Internal links are not affected.

This affects also mail links like:

<a href="mailto:test@domain.org?subject=test&amp;cc=test@domain.org&amp;body=test">Mail Link</a>

And internal links like

<a href="https://currentdomain.org/page/?sender=sendername&amp;receiver=receivername" data-fancybox="iframe" data-type="iframe">Internal Iframe Link (Dialog)</a>

are affected.

Actions #15

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions #16

Updated by Helmut Hummel over 4 years ago

  • Related to Bug #89264: Mailto links in RTE cannot use ampersand to add further arguments like subject=foo&body=bar added
Actions #17

Updated by Stephan Bauer over 2 years ago

Alex Kellner wrote in #note-1:

Our quick workarround (maybe others also need that) is to use htmlspecialchars_decode() on link rendering:
[...]

I still need the typoscript config with TYPO3 10.4.22 and ckeditor.

Actions

Also available in: Atom PDF