Project

General

Profile

Actions

Bug #25823

closed

tslib_cObj::typoLink() geneates invalid links

Added by Michiel Roos over 13 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2011-04-07
Due date:
% Done:

0%

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

Description

TypoLink generates (W3C) invalid links.

Example link in URL bar:
index.php?id=36&TEST=blah[something]

Observed result link from a certain extension using TypoScript typoLink:
index.php?id=36&TEST=blah%5Bsomething%5D&tx_powermail_pi1[mailID]=255&cHash=c81838f48ba09c7dd254e1b37814a86e

Expected result:
index.php?id=36&TEST=blah%5Bsomething%5D&tx_powermail_pi1%5BmailID%5D=255&cHash=c81838f48ba09c7dd254e1b37814a86e

Errors:
- & should be &
- The brackets in the extension parameters are not encoded

Probable problem areas:
- t3lib_div::implodeArrayForUrl()
- t3lib_div::explodeUrl2Array()
- t3lib_TStemplate::linkData()
- realurl

When realurl is enabled, the link parts for which there is no realurl configuration are properly encoded but the & is not replaced with &. RealUrl uses the hook 'typoLink_PostProc' in typoLink().

But it makes sense for TYPO3 to generate validating links out of the box without realurl being enabled.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #80985: RTE: External links with & are broken because & converted to & (ckeditor and rtehtmlarea)Closed2017-04-24

Actions
Actions #1

Updated by Michiel Roos over 13 years ago

Damn these fancy html issue trackers . . .

:-)

Example link in URL bar:
index.php?id=36&TEST=blah[something]

Observed result link from a certain extension using TypoScript typoLink:
index.php?id=36&TEST=blah%5Bsomething%5D&tx_powermail_pi1[mailID]=255&cHash=c81838f48ba09c7dd254e1b37814a86e

Expected result:
index.php?id=36&TEST=blah%5Bsomething%5D&tx_powermail_pi1%5BmailID%5D=255&cHash=c81838f48ba09c7dd254e1b37814a86e

Errors:
- & should be &
- All values and parameters should be properly encoded (brackets etc.)
Actions #2

Updated by Oliver Hader over 13 years ago

  • Target version changed from 4.5.3 to 4.5.4
Actions #3

Updated by Jo Hasenau over 13 years ago

Well - actually the & should be only "amp;ed" for doktypes that require the amp;

HTML should get no amp; at all, while XHTML xxx should get it.

We had to fix some issues like that in a clients project still using the 4.3.x core and noticed that typolink doesn't care about the doktype at all, since it always uses htmlspecialchars for the whole URL. So it looks like we have to fix typolink completely so that it will generate a valid output for any available doktype.

Since this might break the output of extensions that are using typolink and provide a workaround for the problem, we will have to decide though, if this should be fixed in 4.5 at all.

Actions #4

Updated by Oliver Hader over 13 years ago

  • Target version changed from 4.5.4 to 4.5.6
Actions #5

Updated by Chris topher about 13 years ago

  • Target version changed from 4.5.6 to 4.5.8
Actions #6

Updated by Ernesto Baschny almost 13 years ago

  • Target version changed from 4.5.8 to 4.5.12
Actions #7

Updated by Philipp Gampe over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (4.5.12)
  • TYPO3 Version changed from 4.5 to 6.0
  • Complexity set to hard

I guess this one is still open?

This will not be fixed in 4.x as people/extensions suffering from this already found workarounds that would likely break.

Actions #8

Updated by Alexander Opitz almost 11 years ago

  • TYPO3 Version changed from 6.0 to 4.5
  • Is Regression set to No

Hi Michiel,

is this issue still open?

Actions #9

Updated by Michiel Roos almost 11 years ago

I guess it is still open since it was not fixed.

Actions #10

Updated by Alexander Opitz almost 11 years ago

  • Status changed from Needs Feedback to New
Actions #11

Updated by Mathias Schreiber almost 10 years ago

  • Target version set to 7.2 (Frontend)
Actions #12

Updated by Benni Mack over 9 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Actions #13

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #14

Updated by Benni Mack about 9 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #15

Updated by Mathias Schreiber about 9 years ago

  • Target version deleted (7 LTS)
Actions #16

Updated by Benni Mack over 7 years ago

  • Related to Bug #80985: RTE: External links with & are broken because & converted to & (ckeditor and rtehtmlarea) added
Actions #17

Updated by Susanne Moog about 7 years ago

  • Category changed from Content Rendering to Site Handling, Site Sets & Routing
Actions #18

Updated by Benni Mack about 6 years ago

  • Status changed from New to Needs Feedback

Hey,

this issue should be fixed with 9 LTS and site handling. Please let us know if the new version will solve your issue, otherwise we'll close this ticket in the next weeks.

Benni.

Actions #19

Updated by Benni Mack about 6 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF