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

Livetable location filtering doesn't always honor "/" in input

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 10.1-rc-1
    • 10.0
    • LiveTable
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Right now if you have "Blog.BlogIntroduction", using "Blog/Intro" would match but it would also match "BlogForIntrospection" which isn't expected.

      Here's the code:

                ## Because the user might filter with "/" as separator we replace that by "%", because it could be "." 
                ## (the space separator) or "/" (as it is in the document name).
                ## In addition, using "%" (any sequence of character) instead of "_" (any single character) gives the ability
                ## to filter on different levels:
                ##   e.g. filtering on "Blog/Intro" will return "Blog.BlogIntroduction".
                ##        On the other hand, it will also returns: "BlogForIntrospection", which might be unexpected.
                #set ($locationFilterValue = $locationFilterValue.replaceAll('/', '%'))
      

      I'm proposing to change to:

      #set ($locationFilterValue = $locationFilterValue.replaceAll('/', '%.%'))
      

      The issue with the current code is that when using "/" it'll still return result even though there's no location path separator which is wrong.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: