Title: comment_text | get_comment_text problem
Last modified: August 20, 2016

---

# comment_text | get_comment_text problem

 *  [Tumultus](https://wordpress.org/support/users/tumultus/)
 * (@tumultus)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/comment_text-get_comment_text-problem/)
 * I hope someone can help me out with this:
 * I noticed that **comment_text()** is removing empty line breaks from my comments
   and I thought that I could simply add them again with
    `nl2br(comment_text()`
   Unfortunately, that didn’t do the trick! 🙁
 * I then went ahead and used **nl2br(get_comment_text())** instead but that one
   won’t convert smilies. This I only could archive by adding 1 more line of code
   to the default_filters.php within the wp-includes folder:
    `add_filter( 'get_comment_text','
   convert_smilies', 20 );`
 * The above works ok and does what I want it to to, except, I don’t want to modify
   core script files. Can anybody help me getting this done in another way?
 * BTW: I already tried adding **add_filter( ‘get_comment_text’, ‘convert_smilies’,
   20 );** directly to my functions.php but that had no effect at all.

The topic ‘comment_text | get_comment_text problem’ is closed to new replies.

## Tags

 * [comment_text](https://wordpress.org/support/topic-tag/comment_text/)
 * [line breaks](https://wordpress.org/support/topic-tag/line-breaks/)

 * 0 replies
 * 1 participant
 * Last reply from: [Tumultus](https://wordpress.org/support/users/tumultus/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/comment_text-get_comment_text-problem/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
