[drupal-devel] HTML stripped out of my hook_view?
Hello, In this example module: http://drupaldocs.org/api/head/file/contributions/docs/developer/examples/no... The output is themed as (PHP removed): <div class="node_example_order_info"> The order is for %quantity %color items. </div> but when I view a node created with this module, all the HTML is stripped: <div class="content"><p>The order is for 0 items.</p> Can someone point me towards a page or discussion that explains why this is? -Ross
My message hasn't shown up in the archives for yesterday, so I'll send this again: On 6/4/05, Ross M Karchner <rosskarchner@gmail.com> wrote:
Hello,
In this example module: http://drupaldocs.org/api/head/file/contributions/docs/developer/examples/no...
The output is themed as (PHP removed):
<div class="node_example_order_info"> The order is for %quantity %color items. </div>
but when I view a node created with this module, all the HTML is stripped:
<div class="content"><p>The order is for 0 items.</p>
Can someone point me towards a page or discussion that explains why this is?
-Ross
The example calls node_prepare() which in turn invokes the filter system. The filter system is designed to transform user-specified content from any format into HTML. As the themed output is already HTML, this will cause problems if the format is not Full HTML. In your case, the div is stripped out because it is a disallowed tag. This is really not advisable, the example should be changed. Steven Wittens
participants (2)
-
Ross M Karchner -
Steven Wittens