31570[BUGFIX] stdWrap.addparams now respects HTML comments
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 2
Review log 32
Show 7 earlier messages
-
Mr. Jenkins commented on patch set 1 CR -1 V -1 07/10/14, 18:50
Build Failed https://ci.typo3.org/job/typo3-v4-core-gerrit/17321/ : FAILURE -
Markus Klein updated the commit message in patch set 1 07/10/14, 18:57
-
Markus Klein commented on patch set 2 CR -1 07/10/14, 18:58
I'll do an in-depth review later.ContentObjectRenderer.php:4209Jenkins does not like trailing spaces. Please configure your editor to strip them automatically on save. -
Mr. Jenkins commented on patch set 2 CR -1 V -1 07/10/14, 19:11
Build Failed https://ci.typo3.org/job/typo3-v4-core-gerrit/17324/ : FAILURE -
Markus Klein uploaded patch set 3 09/23/14, 18:41
-
Markus Klein commented on patch set 2 09/23/14, 18:41
ContentObjectRenderer.php:4196why the last ? here? -
Markus Klein commented on patch set 3 09/23/14, 18:42
UntestedContentObjectRenderer.php:4195The second ? is still not understood by me.
-
Markus Klein commented on patch set 3 12/01/14, 10:41
@Lukas, please answer to my question!! -
Lukas Domnick commented on patch set 3 12/01/14, 10:48
> @Lukas, please answer to my question!! Hey, i had answered in-line in the code comment, sorry. "To make it un-greedy, thus the NEXT closing bracket is taken. Else wise, it would match any character including the last closing bracket" -
Markus Klein commented on patch set 3 12/01/14, 11:01
Thanks for the fast reply. I guess your comment is still marked as "draft" in Gerrit. You need to Reply in order to get your comment submitted. We really need unit tests here that cover all those cases.ContentObjectRenderer.php:4195ReplyOk I don't know this syntax. You say it make the regexp un-greedy. To my understanding the ? refers to the * beforehand, which does not seem to make sense to to me. Maybe you have a link at hand, which explains this syntax. I'm eager to learn new stuff. ;-) -
Lukas Domnick commented on patch set 3 12/01/14, 11:43
Hey I have prepared a minimalistic example that shows the difference between greedy and ungreedy in our case: http://jsfiddle.net/dcuup7zf/ I believe that this one sums it up pretty well: http://www.rexegg.com/regex-quantifiers.html For the german peers, I found this resource the most understandable back in my perl times: http://de.selfhtml.org/perl/sprache/regexpr.htm -
Markus Klein commented on patch set 3 12/01/14, 11:52
Thanks, really learned something new. Now I've to find out which engines support this (PCRE obviously, but grep, egrep, sed, etc.?), because my brain tells me: "you learned some times back that regexp is normally greedy and you need to exclude the following char to get ungreedy: [^<]*" Fine for the patch now. We should still have unittests -
Mathias Schreiber wrote 12/17/14, 20:36
Topic set to cObj -
Mathias Brodala commented on patch set 3 CR -1 12/17/14, 22:34
Please mark this change as [!!!] breaking since it changes required _offset values. And please also add an .rst file for this. -
Jigal van Hemert commented on patch set 3 12/26/14, 11:02
See comments, plus we really could use some unit tests for this function. Will try to push a new set with tests.ContentObjectRenderer.php:4195Reply.*\> would match anything until the last '>'; .*?\> will match anything until the first '>'. With the '?' the '*' quantifier becomes "lazy" instead of "greedy". http://php.net/manual/en/regexp.reference.repetition.php The [:space:] class includes a Vertical Tab which is not a space character in HTML. \s matches exactly the white space characters in HTML.ContentObjectRenderer.php:4210Type juggling here is a bit confusing. Better initialize is as zero and do strict comparison.ContentObjectRenderer.php:4221No early returns (only guard cases in the beginning of a function) -
Jigal van Hemert uploaded patch set 4 12/26/14, 14:13
-
Jigal van Hemert commented on patch set 4 CR +1 V +1 12/26/14, 14:15
Some minor changes, plus the function has unit tests. -
Helmut Hummel commented on patch set 4 12/26/14, 16:33
ContentObjectRendererTest.php:3017testcases for documented magic values -1 and -2 should be added: http://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Addparams/Index.html -
Jigal van Hemert uploaded patch set 5 12/27/14, 14:07
-
Jigal van Hemert commented on patch set 5 CR +1 V +1 12/27/14, 14:08
Added requested tests. -
Mathias Brodala commented on patch set 5 CR -1 12/30/14, 09:44
Please see my comments from patch set 3. -
Jigal van Hemert commented on patch set 5 12/30/14, 09:56
> Please see my comments from patch set 3. _offset values are not required and this patch shouldn't change the meaning of the values. Can you explain how and where this is changed, or better can you push a version where this is fixed? -
Mathias Brodala commented on patch set 5 12/30/14, 10:12
I have not tried the change yet but currently you have to work around HTML comments using _offset which is bound to change if HTML comments are not considered as items anymore. Am I wrong? -
Stefan Froemken commented on patch set 5 01/05/15, 22:05
ContentObjectRenderer.php:4286interesting solution. With help of "if" we can reduce this part by 3 lines. -
Markus Klein commented on patch set 5 CR -1 01/05/15, 23:38
We need a test case with HTML comments too -
Jigal van Hemert commented on patch set 5 01/31/15, 21:06
> We need a test case with HTML comments too There is a test case with an HTML comment! -
Mathias Brodala commented on patch set 5 02/02/15, 08:26
@Jigal see inline comment in the test case.ContentObjectRendererTest.php:3044Output without this change: <div><!-- class="testClass"><span></span></div>, thus one currently has to use _offset=3 here. -
Benni Mack commented on patch set 5 06/29/15, 20:08
ping. how to proceed? -
Jigal van Hemert commented on patch set 5 06/29/15, 21:20
> ping. how to proceed? No idea. This fixes a bug for which a workaround exists and now the workaround needs to work too? We could mark it as a breaking change, but then it can only go into master. -
Oliver Hader commented on patch set 5 03/31/16, 21:01
I'm rather -1. For me the offset property has to be used. AddParams is not really intended to do DOM manipulations (in terms of a DOM tree). If this patch would be applied, there are several other constellation that still would add the attribute to the "wrong" element. -
Christian Kuhn commented on patch set 5 03/31/16, 21:07
abandoned. doesn't seem to find consensus after nearly 2 years pending. -
Christian Kuhn abandoned the change 03/31/16, 21:07