Hi There,
I just noticed that the trim option in views didn't really seem to be having an effect on the output. Beginning on line 152 of views_data_export.theme.inc, it looks like it is checking to see whether the option is set in the view and then calls trim if appropriate.
if (!empty($vars['options']['trim'])) {
$output = trim($output);
}
But setting or not setting the option has no effect.
But if I just change line 151 to trim everything:
$output = trim(decode_entities(strip_tags($value))); // RRCJAB added trim
then it works beautifully (but obviously on all fields instead of just selected ones).
So maybe this is a bug in views? Honestly, I don't know, but I figured I should mention it.
thanks,
John
Comments
Comment #0.0
drupjab commentedadded code example
Comment #1
steven jones commentedAdd a patch to test CSV trimming
Comment #2
steven jones commentedComment #4
steven jones commentedComment #5
steven jones commentedComment #6
steven jones commentedTry again
Comment #7
steven jones commentedPushed those tests into 7.x-3.x.
Comment #8.0
(not verified) commentedclarification