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).

Comments

alex_b’s picture

Assigned: alex_b » Unassigned
Status: Active » Needs review
StatusFileSize
new659 bytes
alex_b’s picture

I'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.

dawehner’s picture

Status: Needs review » Postponed (maintainer needs more info)

At least the output of fieldapi is clean now.

I'm wondering whether this needs still be commited?

esmerel’s picture

Status: Postponed (maintainer needs more info) » Needs review

Not 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.

merlinofchaos’s picture

Why 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.

dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
StatusFileSize
new2 KB

Here is a patch for 6.x-3.x

dawehner’s picture

StatusFileSize
new2 KB

And here is the patch

merlinofchaos’s picture

Looks good on a visual. I think this can go as is.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed to 6.x-3.x and 7.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.