[TYPO3-core] Bug #1343: Minor problemwith tslib_fe::prefixLocalAnchorsWithScript()
Martin Kutschker
Martin.Kutschker at blackbox.net
Mon Dec 12 22:03:23 CET 2005
Michael Stucki <michael at typo3.org> writes on
Mon, 12 Dec 2005 21:42:52 +0100 (MET):
> Makes sense, but:
>
> $this->content = preg_replace('/(<(a|area).*?href=")(#[^"]*")/i','\\1'
> .
> htmlspecialchars($scriptPath) . '\\3',$this->content);
>
> 1. What is the idea behind the question mark left to "href"? I don't
> think this makes sense.
It makes the .* not greedy. So the FIRST href=" will match and not the last.
Sebastian, forget my comment about broken markup. The ? does handle it.
Good man!
Masi
More information about the TYPO3-team-core
mailing list