[TYPO3-dev] setting 'prefixLocalAnchors' is killing FE output

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Feb 18 10:40:24 CET 2008


Franz Koch schrieb:
> Hi Ingo,
>> http://bugs.typo3.org/view.php?id=6415
> 
> thanks for pointing me to the bug report, but unfortunately the problem 
> itself is not fixed with the provided patch. Well, ok, I at least get 
> output again, but the links are then still wrong.
> 
> How about a simple:
> $this->content = str_replace(' href="#',' 
> href="'.htmlspecialchars($scriptPath).'#',$this->content);
> 
> shouldn't that also do the magic? Currently I don't see a use case where 
> this should cause problems. It's at least working for me.

How about that one?

/(<(a|area)[^>]+href=")(#[^"]*")/is

This one makes sure the match doesn't span two tags without relying on the 
greedyness operateror. Additionally it will match a tag that contains new 
line characters ("s").

Masi




More information about the TYPO3-dev mailing list