Review main Merged

22623[BUGFIX] concatenateCSS may produce invalid css

Thorben Nissen CR +2 V +2 Normal +94 −2 updated 03/06/14, 13:51

Commit message

css-files with statements like @import might become corrupted. This is due
a wrong regex in case no quotes (single or double) are provided.

Adjust regex and add testcases.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Alexander Opitz +1
    • Markus Klein +1
    • Christian Kuhn +1
  • Verified V +2
    • Stefan Neufeind +2
    • Alexander Opitz +1
    • Markus Klein +1
    • Christian Kuhn +1

Issues 1

Files 2

Review log 23

  1. Mr. Jenkins commented on patch set 1 CR -1 V -1 07/27/13, 17:22

  2. Thorben Nissen uploaded patch set 2 07/27/13, 17:25

  3. Thorben Nissen uploaded patch set 3 07/27/13, 17:25

  4. Mr. Jenkins commented on patch set 2 07/27/13, 17:25

  5. Mr. Jenkins commented on patch set 3 07/27/13, 17:26

  6. Wouter Wolters voted on patch set 3 CR +1 07/27/13, 17:28

  7. Stefan Neufeind uploaded patch set 4 11/24/13, 22:14

  8. Stefan Neufeind commented on patch set 4 11/24/13, 22:17

    The previously proposed regex also failed in a quite basic case (import without quotes already in front). I've added testcases. Since the functionality introduces linefeeds (in the test visualised with LF) it's quite easy to see where breaks are inserted. This one comes with a proposal for a fixed regex. Imho we just need to search for everything which is not quotes or a round brace (without quotes before it).
  9. Mr. Jenkins commented on patch set 4 CR -1 V -1 11/24/13, 22:26

  10. Stefan Neufeind updated the commit message in patch set 4 11/24/13, 22:30

  11. Mr. Jenkins commented on patch set 5 11/24/13, 22:43

  12. Markus Klein commented on patch set 5 11/25/13, 09:07

    ResourceCompressorTest.php:57

    Why LF<space> here before body?
  13. Stefan Neufeind commented on patch set 5 11/25/13, 09:21

    ResourceCompressorTest.php:57 Reply

    It's based on the source (string), Luke :-) The url-line is cut out by a regex, moved to the front, that "head"-part is followed by an LF then an the rest is appended. We might consider adding a trim from the "rest"-part or so. But that's not critical in my eyes. (Feel free to tweak it further.) It works as expected and the regex works correct. Without the regex-adjustment you'll see that a LF was added after the #ffffff; - which caught my attention and showed that the regex worked incorrectly. Try it.
  14. Markus Klein commented on patch set 5 CR +1 11/25/13, 09:24

    Thx for explanation.
  15. Stefan Neufeind commented on patch set 5 01/16/14, 23:14

    please review
  16. Markus Klein commented on patch set 5 CR 0 01/16/14, 23:47

    ResourceCompressor.php:652

    The single \ need another \ for proper PHP \ escaping
  17. Markus Klein uploaded patch set 6 03/05/14, 19:24

  18. Markus Klein voted on patch set 6 V +1 CR +1 03/05/14, 19:24

  19. Mr. Jenkins commented on patch set 6 03/05/14, 19:37

  20. Alexander Opitz voted on patch set 6 V +1 CR +1 03/06/14, 07:23

  21. Christian Kuhn voted on patch set 6 V +1 CR +1 03/06/14, 12:42

  22. Stefan Neufeind commented on patch set 6 V +2 CR +2 03/06/14, 13:51

    Looked at it again, and the new tests work fine for me. Imho let's have this. Thanks for all the reviews.
  23. Stefan Neufeind merged patch set 7 03/06/14, 13:51