Project

General

Profile

Actions

Bug #17636

closed

config.prefixLocalAnchors = all destroys links in fe

Added by Alexander Bohndorf over 16 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2007-09-28
Due date:
% Done:

0%

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

Description

This TS Setup config.prefixLocalAnchors = all should replace all links like <a href="#" into <a href="[path-to-url]#".

Because of an error in a regular expression this function can result in destroying all this links in fe.

The error is in /typo3/sysext/cms/tslib/class.tslib_fe.php in line 3667, function prefixLocalAnchorsWithScript()

Patch:
Replace the line with the following:
$this->content = preg_replace('/(<(a|area).*\?href=")(#[^"]*")/i','$1' . htmlspecialchars($scriptPath) . '$3',$this->content);

In the regular expression the must an backslash be added before the question mark.

TYPO3 4.1.2
(issue imported from #M6415)


Files

Actions

Also available in: Atom PDF