1

I'm trying to remove a <p> tag from a manually created block. This block only contains an image and nothing else. I have kpr() function outputting block variables but am not seeing where, or how the unnecessary <p> tag is being generated.

Would the modification occur in theme_preprocess_block function? It seems it's not possible to get rid of within the block template file.

Another thing is that my tried was getting turning on themes info, clicking the element in hopes of finding some override function, but themer_info only shows me block info instead of some function info.

Any help would be greatly appreciated, thank you.

0

It's in fact because of the text input format. Going to admin/config/content/formats and removing the checkbox for

Convert line breaks into HTML (i.e. <br> and <p>)

for the input format you're using should do the trick (re-save the block, of course). Also, if you use WYSIWYG editor, it could do some formatting for you and put the image in <p> tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.