Project

General

Profile

Actions

Bug #20514

closed

links created by tslib_cObj->typolink_URL are not valid HTML/XHTML

Added by André Spindler over 15 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-05-27
Due date:
% Done:

0%

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

Description

When creating links with several parameters using the function tslib_cObj->typolink(), the url is created fine: the parameters are separated by an "&" and so the link produces no errors with the validator of the W3C.

But things change when creating the url with tslib_cObj->typolink_URL(): In the created url the parameters are separated only with "&", so this url produces errors in the W3C validator.

Lookin in the source at line 5514 of class.tslib_content (TYPO3 4.2.6), You see that typolink_URL() just call typolink() with an empty wrap as label.

The problem is the value typolink_URL returns: the value "$this->lastTypoLinkUrl" is set in typolink() at line 5426. But setting the htmlentities is not done on this string, so it stays untouched. So when typolink() returns, $this->lastTypoLinkUrl is set to a string with wrong entities.

I don't know if this is a bug or a feature. In my own extensions I now can use htmlentities() myself. But as system-extensions like "felogin" are printing the url directly in the template (as url for the action parameter in the form tag), this seems to be a bug for me.

So I suggest to change the behaviour of the link-generation to ensure that $this->lastTypoLinkUrl has entities included. But I think this change should be handled with care: Perhaps there are others around, who use htmlentities by themselves.

(issue imported from #M11202)

Actions #1

Updated by Lina Wolf almost 15 years ago

I guess this would be a feature. Links are not only used in HTML but can also be used in non-HTML E-Mails, XML, PDF Generation and so forth. in such cases other forms of coding mit be required.

Actions #2

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.2

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #3

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions

Also available in: Atom PDF