553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
|
blob_set(&title, zThreadTitle);
/* truncate the title when longer than max allowed;
* in case of UTF-8 make sure the truncated string remains valid,
* otherwise (different encoding?) pass as-is
*/
if( mxForumPostTitleLen>0 && blob_size(&title)>mxForumPostTitleLen ){
int len;
len = utf8_nearest_codepoint(blob_str(&title), mxForumPostTitleLen);
if( len ){
blob_truncate(&title, len);
blob_append(&title, "...", 3);
}
}
style_header("%s%s", blob_str(&title), blob_size(&title) ? " - Forum" : "Forum");
blob_reset(&title);
|
|
|
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
|
blob_set(&title, zThreadTitle);
/* truncate the title when longer than max allowed;
* in case of UTF-8 make sure the truncated string remains valid,
* otherwise (different encoding?) pass as-is
*/
if( mxForumPostTitleLen>0 && blob_size(&title)>mxForumPostTitleLen ){
int len;
len = utf8_codepoint_index(blob_str(&title), mxForumPostTitleLen);
if( len ){
blob_truncate(&title, len);
blob_append(&title, "...", 3);
}
}
style_header("%s%s", blob_str(&title), blob_size(&title) ? " - Forum" : "Forum");
blob_reset(&title);
|