....ooops, quality checks did bot really pass.... can't figure why, but the fix works as long as util_close_html_tags is used, not ad_html_text_convert.
replacing this line:
set message [ ad_html_text_convert "html" "html" $message]
with this:
set message [ util_close_html_tags $message]
fixes it. I'll see why it does not work otherwise, and then will resubmit the patch.