Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-1318

Viewing TextArea in object adds a newline to end

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1 M2
    • Component/s: {Unused} Rendering 1.0
    • Labels:
      None
    • keywords:
      patch
    • Similar issues:

      Description

      Try the following example:

      1 Demonstrate text area adds newline
      
      This shows that when a value is pulled out of a TextArea object (such as this XWiki.XWikiComments object), a newline is appended to the end. The result is that the next column in the row is displayed in the next row, which makes a big mess of things.
      
      #set($mydoc=$xwiki.getDocument("Main.Download"))
      #set($obj=$mydoc.getObject("XWiki.XWikiComments"))
      
      {table}
      Type | Content | Author
      Main.Download | "$obj.display("comment", "view")" | $obj.display("author", "view")
      {table}
      

      You can see there that I'm pulling a comment out of a page and displaying it in a table. XWiki seems to be adding a newline to the end of the field when it is pulled out (note where the quotation marks are). This normally isn't a problem, except when it is displayed in a

      {table}

      .

      Note that this is a regression from previous versions; in XWiki 0.9x stream, this did not occur.

        Attachments

          Activity

            People

            Assignee:
            vmassol Vincent Massol
            Reporter:
            lauzon Shawn Lauzon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: