Project

General

Profile

Actions

Bug #15909

closed

Internal (on page) links corrupted with t3lib_parsehtml::prefixResourcePath()

Added by Lukas Vorlicek over 18 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Communication
Target version:
-
Start date:
2006-03-27
Due date:
% Done:

0%

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

Description

t3lib_parsehtml::prefixResourcePath() does't work correctly for <a> links with internal (# - onpage) targets:

e.g.

<a href="#content">Skip down to content</a>

will return

<a href="/fileadmin/path/#content">Skip navigation</a>

local target prefixed with current path... Visitor will be redirected somewhere to 404 error, if he clicks link like this, instead of moving forward on the page.

(issue imported from #M3008)


Files

class.t3lib_parsehtml.php.diff (766 Bytes) class.t3lib_parsehtml.php.diff Administrator Admin, 2006-03-27 21:24
Actions #1

Updated by Lukas Vorlicek over 18 years ago

Right example with A tags

<a href="#content">

will return

<a href="/fileadmin/path/#content">

Actions #2

Updated by Ernesto Baschny about 15 years ago

Prefixing #-anchor with current page path is needed if you are using the baseUrl feature (required for realurl), and is enabled with config.prefixLocalAnchors = all.

It won't prefix it with "fileadmin/path/" thou, but with the current page path. Not doing it will jump to the start page, because without it, the anchor will be relative to the baseUrl.

Actions

Also available in: Atom PDF