Why “&nbsp” at the end of each recent comment

  • Author
    Posts
  • #124399

    lundiep
    Member

    I just added the recent comments widget to my sidebar. At the end of each recent comment, “&nbsp” is included. Does anyone know why that is?

    #124602

    salamandrine
    Member

    It’s a blank space and the code is &nbsp ; – with no space before “;”

    i think the widget doesn’t convert the code into the space, that’s why it shows that

    #124604

    devlog
    Member

      is an HTML entity for blank spaces. It seems that what’s happening here is that since there’s a number of characters ‘extracted’ from the title where a comment was left, the program that queries the DB is cutting part of the HTML entity leaving the semicolon out, thus displaying the text instead.

    So, for instance, the title of the posts in the ‘resent comments’ widget are limited to, let’s say, 25 characters. The program will extract those first 25 chars, and because they’re stored in a database (HTML entities are there too) it will count those characters as well and once the program that queries this database ‘counts’ 25 characters, it will cut an entity right at the first character, the middle or at the end, like in this case.

    I’d suggest you to contact staff at support at this domain and link them to this thread. I’m sure they can do something to fix this behavior.

    Hope this helps.

    #124675

    lundiep
    Member

    Makes sense. I knew it was the HTML space character, just couldn’t figure out why it was being displayed.

    I’ve left feedback, so hopefully someone can help me there. Thanks!

The topic ‘Why “&nbsp” at the end of each recent comment’ is closed to new replies.