When I paste my RTF text data from text document to CCK editor, it often creates html 'style' tag on top of the text, which is clearly visible when switching to filtered_html mode view. The issue is that current module still counts data inside this 'style' tag, decrementing the size of output by hundreds of symbols, and even preventing any output in case the 'style' tag data is too long (when its data size is bigger than the limit of truncated text from options).

A few next lines make current module to work like a charm:

if ( $tag[2] ) {
$countingInvisible = preg_match('/style|script/', $tag[2]);
}
if (isset($countingInvisible) && $countingInvisible) {
$contentLength = 0;
}

They should be placed just after calculation of the $contentLength (line 233 on ver. 1.4). Patch is included (needs more test, though it works fine on my production site).

CommentFileSizeAuthor
field_html_trim_style.patch601 bytesnikus85

Comments

nikus85 created an issue.