Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When 'strip_tags' option is true, the code in views_handler_field::render_text()
applies strip_tags()
but does not do any further cleanup which leads in some cases to dirty strings that contain leading and trailing spaces and line breaks (PHP 5.3.3).
Comment | File | Size | Author |
---|---|---|---|
#7 | 1039944-trim-setting.patch | 2 KB | dawehner |
#2 | 1039944_trim_after_strip-DRUPAL-7--3.patch | 659 bytes | alex_b |
#2 | 1039944_-2_trim_after_strip_2010-12-03.patch | 716 bytes | alex_b |
#1 | 1039944_trim_after_strip.patch | 659 bytes | alex_b |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedComment #2
alex_b CreditAttribution: alex_b commentedI'm using an older version of Views checked out on Dec 3rd last year, the patch above does not apply. Attaching:
1. Patch to Drupal 7.3 branch
2. Patch to Drupal 7.3 branch @ 2010-12-03
Most people can ignore patch 2.
Comment #3
dawehnerAt least the output of fieldapi is clean now.
I'm wondering whether this needs still be commited?
Comment #4
esmerel CreditAttribution: esmerel commentedNot sure the OP is the best final word on this (I could be wrong); seems like a pretty straightforward yes or no to me on whether or not it still needs commiting.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedWhy specify spaces and \n -- the other things that trim trims are valid too, aren't they?
The problem is...I worry that a trim without asking is overly aggressive. It seems like it should be an option.
Comment #6
dawehnerHere is a patch for 6.x-3.x
Comment #7
dawehnerAnd here is the patch
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedLooks good on a visual. I think this can go as is.
Comment #9
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted to 6.x-3.x and 7.x-3.x