Project

General

Profile

Actions

Bug #28536

closed

JSwindow-typolink URLs are encoded twice with htmlspecialchars()

Added by Torben Hansen over 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Content Rendering
Target version:
Start date:
2011-07-28
Due date:
% Done:

100%

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

Description

#28189 introduces a bug in JSwindow-typolink URLs, which are being encoded twice with htmlspecialchars().

In "class.tslib_content.php" line 5905 t3lib_div::quoteJSvalue is called, which does htmlspecialchars() on the final URL. Then, in line 5908 again htmlspecialchars() is called for the same URLs, which already has been encoded in line 5905.

This results in non working URLs with double ampersands like this:

www.domain.tld/index.php?id=1&parameter1&parameter2

Removing the htmlspecialchars() in line 5905 resolves the problem.


Files

28536.diff (777 Bytes) 28536.diff Helmut Hummel, 2011-07-29 09:15
Actions #1

Updated by Helmut Hummel over 12 years ago

  • Status changed from New to Accepted
  • Assignee set to Helmut Hummel

Confirmed :(

Actions #2

Updated by Helmut Hummel over 12 years ago

attached patch fixes that

Actions #3

Updated by Torben Hansen over 12 years ago

Thanks! Patch is working.

Actions #4

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change If6bcad4d2bf1e0a4b3f5a6f04e4718df8e4e7150 has been pushed to the review server.
It is available at http://review.typo3.org/3901

Actions #5

Updated by Helmut Hummel over 12 years ago

Steps to reproduce:

1. Use the following Typoscript:

lib.printLink = TEXT
lib.printLink {
value = Print Page
htmlSpecialChars = 1
typolink.parameter = # 800x600:scrollbars=yes
typolink.additionalParams = &print=1
typolink.addQueryString = 1
}

page.1 < lib.printLink

2. Click on the link

Actions #6

Updated by Anonymous over 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Steffen Gebert over 12 years ago

  • Status changed from Resolved to Under Review
Actions #8

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change If6bcad4d2bf1e0a4b3f5a6f04e4718df8e4e7150 has been pushed to the review server.
It is available at http://review.typo3.org/3913

Actions #9

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change If6bcad4d2bf1e0a4b3f5a6f04e4718df8e4e7150 has been pushed to the review server.
It is available at http://review.typo3.org/3914

Actions #10

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change If6bcad4d2bf1e0a4b3f5a6f04e4718df8e4e7150 has been pushed to the review server.
It is available at http://review.typo3.org/3915

Actions #11

Updated by Anonymous over 12 years ago

  • Status changed from Under Review to Resolved
Actions #12

Updated by Riccardo De Contardi about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF