I was checking how Views was trimming text fields because I have problems with accentuated characters (Views consider these characters as word boundaries) and just discovered a little tiny detail that could be very easily solved.
if (!empty($alter['ellipsis'])) {
$value .= '...';
}
It could be like this, using the ellipsis character instead of three dots:
if (!empty($alter['ellipsis'])) {
$value .= '…';
}
Typographically speaking, it is much more appropiated.
By the way, I haven't found a clue about Views chopping words with accents yet…
Comments
Comment #1
merlinofchaos commentedIt is because that preg function used to find boundaries is not multi-byte safe and there isn't, as far as I can tell, a multi-byte alternative I can use.
The ellipsis thing makes some sense. CAn I get a real patch?
Comment #2
tomgf commentedI have attached the patch here.
Note: iit's the first one I provide so please tell me if there is something wrong.
Comment #3
dagmarComment #4
merlinofchaos commentedCommitted to all branches.