A user posted a query against flashnode as they couldn't get flash content generated via a macro to display as a block unless they selected Full HTML as the format (their request/comments here).

I did some investigation and I think the bug is in nodeasblock. The function theme_nodeasblock calls node_prepare, and then node_view, but node_view also calls node_prepare by itself. This results in check_markup getting called twice. The first call (by nodeasblock) results in the macro being expanded. The second call results in the expanded macro being removed from the node as it is considered invalid markup (it contains tags such as div, script etc which are not usually permitted).

This bug will affect any content using a macro system to generate content.

The issue seems to be resolved, with no adverse affects, by removing the call that nodeasblock makes to node_prepare (line 145 of version 1.3.2.4 of module).

Comments

Christefano-oldaccount’s picture

Hi Stuart,

Can you include a patch? That may help get more eyes on this problem.

dropcube’s picture

Version: 5.x-1.1 » 5.x-1.x-dev
Assigned: Unassigned » dropcube
Status: Active » Fixed

Yes, that's true, calling node_prepare() twice causes that filters are executed twice and the markup content removed.
I have fixed this by removing node_prepare() and calling node_view directly().

Anonymous’s picture

Status: Fixed » Closed (fixed)

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