Issue Bug Closed

#17636config.prefixLocalAnchors = all destroys links in fe

Alexander Bohndorf 09/28/07, 17:48 updated 01/21/09, 10:09

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.