summaryrefslogtreecommitdiff
path: root/modules/aggregator.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2004-04-15 14:07:08 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2004-04-15 14:07:08 +0000
commita083daf8418d1dc6e0cbc5b41924c9d364815f9e (patch)
treed2bd8288eb65db1e741043e451f2cc1c20d2d093 /modules/aggregator.module
parent803dacf65225d78c2ffe60a853b1c822f4e628e1 (diff)
downloadbrdo-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.module2
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));
}
/*