diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-04-15 14:07:08 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-04-15 14:07:08 +0000 |
commit | a083daf8418d1dc6e0cbc5b41924c9d364815f9e (patch) | |
tree | d2bd8288eb65db1e741043e451f2cc1c20d2d093 /modules/aggregator.module | |
parent | 803dacf65225d78c2ffe60a853b1c822f4e628e1 (diff) | |
download | brdo-a083daf8418d1dc6e0cbc5b41924c9d364815f9e.tar.gz brdo-a083daf8418d1dc6e0cbc5b41924c9d364815f9e.tar.bz2 |
Truncate UTF-8 patch. Introduced a new function truncate_utf8() for chopping off strings at unsure locations, without risking incomplete UTF-8 data.
Diffstat (limited to 'modules/aggregator.module')
-rw-r--r-- | modules/aggregator.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module index 331387cfa..8b78b71fd 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -397,7 +397,7 @@ function aggregator_parse_feed(&$data, $feed) { $title = $item["TITLE"]; } else { - $title = preg_replace('/^(.*)[^\w;&].*?$/', "\\1", substr($item["DESCRIPTION"], 0, 40)); + $title = preg_replace('/^(.*)[^\w;&].*?$/', "\\1", truncate_utf8($item["DESCRIPTION"], 40)); } /* |