Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By simon rawson on
When ever my modules return content through theme_ type functions the div tags get stripped out. Can anyone help me to understand why this is????
Comments
stripping tags
stripping tags appears to have been caused by one of my filters.
I don't yet understand filters, but I've disabled them and it works now!
node_prepare()
Just to conclude my little conversation with myself, in case anyone else might ever find this useful when searching these fora, my problem lay with the function node_prepare(), which applies filters to the output, which may strip out tags, if defined to do so.
The answer is to run only specific parts through node_prepare(). e.g. the body text.