Comments are filtered ignoring their current format.

This happens in comment.inc/project_comment_view() because comment.inc invokes check_markup($comment->body)without specifying the filter format to be used.

In that case check_markup< uses DEFAULT_FILTER_FORMAT, which will not necessarily be the format the comment was posted in.

A quick temporary fix is to remove the call to check_markup().

The problem for a better fix is however deeper: although the comment entry form allows the user to specify an input format, it does not seem to be stored in project_comments, although it would probably fit nicely as a filter row in the data array of the table.

This could probably be done by storing in along with the status fields in comment.inc/project_comment_save($edit).

Comments

dww’s picture

nice catch, thanks for the report. i just posted a patch for getting previews working again when you follow-up to an issue that fixes this bug, too. see post #24 from issue #29105 for details...

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review
dww’s picture

Assigned: dww » Unassigned
Status: Needs review » Active

http://drupal.org/node/29105 is finally fixed and commited. however, starting around comment #36, dries raised concerns about how i was handling the filter format. later changes and testing were causing problems, and i didn't want to delay #29105 any longer for this, a decidedly non-critical bug. so, this is back to the drawing board at this point. see the comments (and some of my patches) at the end of #29105 for a starting point, but this is no longer that interesting to me. ;)

dww’s picture

Project: Project » Project issue tracking
Version: x.y.z » 5.x-1.x-dev
Status: Active » Closed (won't fix)

This is fixed in 5.x-2.* by IFAC. I don't think anyone's going to fix this for pre-IFAC at this point.

dww’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
Status: Closed (won't fix) » Fixed

actually, i guess this is more appropriate. ;)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.