Apache Roller
  1. Apache Roller
  2. ROL-1642

Comments do not show in feeds with some readers.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0.1
    • Labels:
      None
    • Environment:
      Any
    • Browser Version:
      Firefox 2.0.0.11
    • Customer(s):
      jasonrumney.net
    • Database:
      PostgresQL 8.2.5
    • JDK Version:
      JDK 1.6.0-b105
    • O/S Version:
      Debian GNU/Linux (unstable - 2.6.18)

      Description

      When viewing the Atom or RSS comment feed in Firefox (2.0.0.11) or RSSOwl (2.0m7), the comment content does not show. Viewing in IE7, it does show, so the problem is limited to some readers.

      The problem appears to be caused by a newline between the opening content/description tag and the comment text. This newline appears to be embedded in the comment itself, as the template generation code in feed.vm has $comment.content appearing immediately after the open tag.

      Although this is really a bug in those newsreaders, it would be an improvement if roller avoided the bug.

      1. ASF.LICENSE.NOT.GRANTED--AutoformatPlugin.patch
        0.8 kB
        Jason Rumney
      2. ASF.LICENSE.NOT.GRANTED--feeds.patch
        2 kB
        Jason Rumney
      3. ROL-1642.patch
        1 kB
        Nathan Beyer

        Activity

        Hide
        Jason Rumney added a comment -

        The newline seems to come from the AutoFormatPlugin. Patch attached (against 4.0 apps/weblogger/src/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java)
        Since closing a paragraph adds two newlines, the newline before the start of a paragraph was surplus to requirements anyway, even if prettiness of the html source is a requirement here.

        Show
        Jason Rumney added a comment - The newline seems to come from the AutoFormatPlugin. Patch attached (against 4.0 apps/weblogger/src/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java) Since closing a paragraph adds two newlines, the newline before the start of a paragraph was surplus to requirements anyway, even if prettiness of the html source is a requirement here.
        Hide
        Jason Rumney added a comment -

        My previous assumption about the cause of this was wrong. This is a bug in roller (I can't change the Type to indicate this unfortunately). HTML comments are being included in the feed without escaping. The attached patch fixes it.

        The previous patch is not necessary, but could be considered cleanup anyway, since paragraph breaks are currently followed by three new lines instead of the conventional two.

        Show
        Jason Rumney added a comment - My previous assumption about the cause of this was wrong. This is a bug in roller (I can't change the Type to indicate this unfortunately). HTML comments are being included in the feed without escaping. The attached patch fixes it. The previous patch is not necessary, but could be considered cleanup anyway, since paragraph breaks are currently followed by three new lines instead of the conventional two.
        Hide
        Nathan Beyer added a comment -

        Jason, Can you post a unified diff of the patch? You can use 'svn diff' to generate one.

        Show
        Nathan Beyer added a comment - Jason, Can you post a unified diff of the patch? You can use 'svn diff' to generate one.
        Hide
        Nathan Beyer added a comment -

        I applied the 'feeds.patch' and it allows comments feeds to be properly created when HTML is allowed in the comments.

        This gets my vote.

        Show
        Nathan Beyer added a comment - I applied the 'feeds.patch' and it allows comments feeds to be properly created when HTML is allowed in the comments. This gets my vote.
        Hide
        Nathan Beyer added a comment -

        ROL-1642.patch is the same as feeds.patch, but in SVN diff form.

        Show
        Nathan Beyer added a comment - ROL-1642 .patch is the same as feeds.patch, but in SVN diff form.
        Hide
        David Johnson added a comment -

        Added escaping for comment content in both RSS and Atom versions of comment feed.

        Show
        David Johnson added a comment - Added escaping for comment content in both RSS and Atom versions of comment feed.
        Show
        David Johnson added a comment - Fixed in trunk: http://svn.apache.org/viewvc?rev=730036&view=rev Fixed in 4.0 branch: http://svn.apache.org/viewvc?rev=730037&view=rev
        Hide
        Glen Mazza added a comment -

        Closing all resolved/fixed issues of already released versions of Roller.

        Show
        Glen Mazza added a comment - Closing all resolved/fixed issues of already released versions of Roller.

          People

          • Assignee:
            David Johnson
            Reporter:
            Jason Rumney
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development