Bug #89338

Links such as tel: ... in content elements cause an error

Added by Edward A. Gabdullin 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2019-10-03
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Links such as tel: ... in content elements cause an error:

(1/1) TypeError

Argument 2 passed to TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::addSecurityRelValues() must be of the type string, null given, called in /var/www/html/typo3_src-10.1.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php on line 5133

in /var/www/html/typo3_src-10.1.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 5182

scr_489.jpg View (304 KB) Edward A. Gabdullin, 2019-10-03 15:06


Related issues

Related to TYPO3 Core - Feature #78488: Add rel="noopener noreferrer" to links when target is set to _blank Closed 2016-10-28

Associated revisions

Revision e6a2f88f (diff)
Added by Christian Eßl 3 months ago

[BUGFIX] Make the $target parameter for addSecurityRelValues nullable

In the typoLink() function of ContentObjectRenderer, not all links will
have a 'target' value. - If the protocol is not natively supported by
TYPO3, as in "tel:", only a 'url' parameter will be resolved.
For that reason, make the $target parameter of addSecurityRelValues()
nullable to avoid frontend errors when using custom link protocols.

Resolves: #89338
Releases: master
Change-Id: I6bca872e38e2f5618a5c06a5ebd3476beb2e60a0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61879
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Daniel Goerz <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Andreas Fernandez <>

History

#1 Updated by Gerrit Code Review 4 months 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/c/Packages/TYPO3.CMS/+/61879

#2 Updated by Edward A. Gabdullin 4 months ago

Gerrit Code Review wrote:

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/c/Packages/TYPO3.CMS/+/61879

Thanks!

#3 Updated by Christian Eßl 4 months ago

  • Related to Feature #78488: Add rel="noopener noreferrer" to links when target is set to _blank added

#4 Updated by Christian Eßl 3 months ago

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

#5 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF