WP Line Breaks in Comments

Rocky left me a poem in my comments, which revealed that my WP line-break fix was fixing a bit too much. I still need the fix for weird old Blogger and MT entries, but I didn’t want it “fixing” the linebreaks in comments.

So the line break fix is just replacing br=1 with br=0 in the wpautop function in wp-includes/formatting-functions.php. The trouble came up when my altered wpautop was loaded as a filter in wp-includes/template-functions-comment.php. I needed the old one there. If I really understood the functions, maybe I could have stuck a br=something into wp-includes/template-functions-comment.php, but I was just there to hack. So instead I made a copy of wpautop in wp-includes/formatting-functions.php, called it wpautopp, and changed the filter name in wp-includes/template-functions-comment.php to wpautopp.

It works, but upgrading to WP 1.3 is going to be a nightmare for me.

One Response to “WP Line Breaks in Comments”

  1. TreeFrog Says:

    Terrific Blog you have. Peace Out.
    TreeFrog