Review main Abandoned

13493[FEATURE] Add whitespace between stripped tags

Ingo Pfennigstorf CR 0 V 0 Easy +43 −0 updated 07/04/13, 13:39

Commit message

This adds an option "addWhitespaceBetweenTags" to stdWrap.stripHtml
and allows adding whitespace between to following html tags that are
passed through that function.

Review

  • Code review CR 0
  • Verified V 0

Files 2

Review log 17

  1. Oliver Klee commented on patch set 2 05/27/13, 17:19

    I would prefer that you didn't submit this

    class.tslib_content.php:2671

    Can we have a unit tests for this behavior (both that the new bheavior works as well as that nothing breaks)?
  2. Ingo Pfennigstorf commented on patch set 2 05/27/13, 17:19

    @Oli - see my suggestion here http://forge.typo3.org/issues/39578#note-3
  3. Ingo Pfennigstorf uploaded patch set 2 05/27/13, 17:19

  4. Stefan Neufeind commented on patch set 4 05/27/13, 17:19

    Should multiple replaces tags in a row maybe be replaced by just one "whitespace" here? Should we have a general replacement so other things (maybe <br>'s) could be added instead of whitespaces? But then how do we add a whitespace, since those would usually be trimmed. Hmm ...
  5. Oliver Klee commented on patch set 4 05/27/13, 17:19

    (1 inline comment)
  6. Oliver Klee commented on patch set 4 05/27/13, 17:19

    I would prefer that you didn't submit this Please also rename/change/add the tests as Philipp suggested.
  7. Christian Kuhn uploaded patch set 4 05/27/13, 17:19

  8. Christian Kuhn commented on patch set 4 05/27/13, 17:19

    Added another test to make sure that this also works for multiple tags. Things coming to my mind: - Would it make sense to specify the 'glue' character / word? Is it always 'whitespace' that is needed? - Does crop, cropHtml and friend interfere with this? Furthermore, we need an issue in the documentation for this.
  9. Philipp Gampe commented on patch set 4 05/27/13, 17:19

    (3 inline comments)

    class.tslib_contentTest.php:1048

    actually this test checks the default without withspace, also change the text below

    class.tslib_contentTest.php:1061

    This time the test checks for the existence of a whitespace, thus stripHtmlAndAddWhitespaceForTags or something along the line. The function name should result in a human readable sentence if you replace all caps with a space and the lowercase variant.

    class.tslib_content.php:2672

    this regexp is hard to understand. Maybe use another char than '/' as delimiter, e.h. '#'. This results in less escaping. Please add a comment about what exactly the regexp does, because I had to read it three times before I got it.
  10. Ingo Pfennigstorf uploaded patch set 3 05/27/13, 17:19

  11. Ingo Pfennigstorf commented on patch set 4 05/27/13, 17:19

    Ok, I see. ads = TEXT ads.value = <li>Huhu</li><li>Lolli</li> ads.stripHtml = 1 ads.stripHtml.addWhitespaceBetweenTags = 1 ads.crop = 7 | · | 0 So it does definetly concern other stdWrap functions. Will this block this issue, or is it a desired behaviour, though adding whitespace is not the default setting
  12. Ingo Pfennigstorf commented on patch set 4 05/27/13, 17:19

    Thanks, Christian. Could you provide a use case for not using whitespace as separator? In which way could crop and cropHtml be concerned? Maybe we (I) could cover this with tests
  13. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

    Fails; I would prefer that you didn't submit this Build Failed https://ci.typo3.org/job/typo3-v4-core-gerrit/5161/ : FAILURE
  14. Mr. Jenkins commented on patch set 2 05/27/13, 17:19

  15. Mr. Jenkins commented on patch set 3 05/27/13, 17:19

  16. Mr. Jenkins commented on patch set 4 05/27/13, 17:19

  17. Ingo Pfennigstorf abandoned the change 07/04/13, 13:39