All of my comments for all of my content types do not respect show line breaks. I have tried to dig pretty deep into this issue but I now feel quite stuck.

This is what I discovered.

  • The problem is not related to the text formats. (I have verified that Convert line breaks into HTML is checked.)
  • The problem may have to do with safe_value. I used dsm() to show content of the $vars variable inside the hook_preprocess_field() implementation of the theme, which shows the value of the comment body has line breaks, but save_value doesn't.
  • The issue is not related to the format. With dsm() I have verified that the comment body is using the Filtered HTML input format, which I believe is correct.

This is what dsm() outputs for the comment body.


2 Answers 2


When I found this problem it was because the results of the filter were being stripped by another filter.

Go to /admin/config/content/formats and check your filter processing order. The 'Convert line breaks into HTML' should be the last one.

  • 1
    That was a good guess (Correct faulty and chopped off HTML) was last in the order but I changed it so that 'Convert line breaks into HTML' was last, and it is still happening. I tried to clear the cache just to be safe but that didn't help.
    – Mike2012
    Mar 28, 2013 at 22:41
  • @Mike2012 - Then one of your filters is stripping the line breaks themselves. Eliminate them one by one and find which one. Good luck.
    – Triskelion
    Mar 28, 2013 at 22:44
  • ah, sweet thank you. In my case it seemed that 'Limit allowed HTML tags' was the culprit.
    – Mike2012
    Mar 28, 2013 at 22:50
  • Your welcome. Happy to have helped.
    – Triskelion
    Mar 28, 2013 at 22:51
  • Just a quick follow up. Make sure that 'Limit allowed HTML tags' permits p and br, and put it after the 'Convert line breaks into HTML'. It should work.
    – Triskelion
    Mar 28, 2013 at 22:56

I came across the same problem and I solved it by visiting /admin/structure/types/manage/<content-type>/{fields,comment}/display and changing the format to Default. Then, I played with the input formats accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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