An odd little bug. I assume its a bug anyway.
If you try and use the Fields->"Trim this field to a maximum length" checkbox in order to only use the Strip HTML tags checkbox under it then you must place a number into the Maximum Length textbox.
Perhaps this is intended as this entire area is designated as the "Trim this field" area. However there could easily be reasons to use the Strip HTML tags feature without needing to trim the length of a field at all.
You can set the Maximum length to 10,000 resulting in no actual trimming and then check off Strip HTML tags.
Would it make more sense to seperate the Strip HTML off into a seperate checkbox away from Trim?
Comments
Comment #1
endiku commentedJust realized I wasn't quite clear enough. If you leave Maximum length empty then no stripping occurs at all. So a solution would need to be just more than moving the checkbox but to untie it from Trim in the code needing a length.
Will probably look into it further myself when I get some time.
Comment #2
dawehnerHere is a patch for this :)
Comment #3
merlinofchaos commentedI like this patch a little better. Can someone confirm for me this fixes the problem?
Comment #4
crashtest_ commentedTested, and found that the patch doesn't cover the original poster's issue, that being that regardless of what settings you have applied to other "Trim" settings, if "Strip HTML" is selected, it should strip the HTML.
This patch includes merlin's patch above, so that what he was addressing with it is still being addressed.
Comment #5
crashtest_ commentedAddressing some comments in IRC about placement of the strip_tags and removing the Trim dependency on stripping HTML.
Comment #6
crashtest_ commentedBecause of issue http://drupal.org/node/723286 being closely related, I did a re-roll that incorporates both patches into one. The purpose being that both patches would undo the other patch's change, causing mayhem and panic throughout the land. So, here is a new patch. (this message repeats one time)
Comment #7
dawehnerI'm fine with merging the two patches, but:
Comment #8
dawehnerUpdate title
Comment #9
crashtest_ commentedOh darn, sorry about that!
Comment #10
merlinofchaos commentedCommitted to all branches. Thanks guys!
Comment #11
merlinofchaos commentedHm. Somehow I grabbed the one with the dsm in it and applied it.
In any case, I'm reopening this. We shouldn't name it drupal_trim_text() -- that's not our namespace. It should be views_trim_text().
Comment #12
dawehnerHere is a trivial patch
Comment #13
merlinofchaos commentedCommitted to all branches.