Issue Bug Closed

#14950prefixLocalAnchorsWithScript should allow arbitrary data between the tag's start and the href attribute

Wolfgang Klinger 08/30/05, 06:44 updated 08/12/06, 14:24

Description

currently it only works if the link has this format:

<a href="#top">

but e.g. not with

<a class="something" href="#top">
    function prefixLocalAnchorsWithScript() {
        $scriptPath = substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
        $this->content = eregi_replace('(<(a|area)[[:space:]]+href=")(#[^"]*")','\1'.htmlspecialchars($scriptPath).'\3',$this->content);
    }

(issue imported from #M1419)

Reviews 0

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