[TYPO3-core] RFC #8637: Bug: t3lib_parsehtml::substituteMarkerArray() deletes too much if wrap is not set
Ernesto Baschny [cron IT]
ernst at cron-it.de
Mon Jun 9 16:25:37 CEST 2008
Hi,
+1 also on reading and testing. I have also considered the arguments
from Francois in answer to Benni and Peter.
Since Benni and I gave a +1 and there were others that +1 on testing, I
committed the stuff to TYPO3_4-2 (rev.3770) and trunk (rev.3771).
Cheers,
Ernesto
Francois Suter wrote: on 07.06.2008 22:27:
> This is an SVN patch request.
>
> Type: Bugfix
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=8637
>
> Branches:
> 4_2 and Trunk
>
> Problem:
> In RFC 0007383 a 5th parameter was added to
> t3lib_parsehtml::substituteMarkerArray() to remove unused markers. It
> does so with the following line:
>
> $content =
> preg_replace('/'.preg_quote($wrapArr[0]).'([A-Z0-9_-|]*)'.preg_quote($wrapArr[1]).'/is',
> '', $content);
>
> This will fail if the marker wrap is not defined, because the default
> wrap is ### where the $wrapArr is empty when no wrap is passed to this
> method.
>
> Solution:
> The solution is to initialise $wrapArr when no marker wrap argument was
> passed.
>
> Notes:
> The solution is really simple, but I think the bug is pretty bad as it
> can be quite a surprise to extension authors in particular. The fix is
> easy, so I hope this can make it in time into 4.2.1.
>
> Cheers
>
More information about the TYPO3-team-core
mailing list