Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3795

Node names from content apps that contain ~ (tilde) might cause trouble when used in URL (e.g. categories)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Neutral Neutral
    • None
    • 5.4.4
    • content app
    • None

      When e.g. a category contains a ~ in its node name and when it's used in the website in an URI (by means of selector parameter, see info.magnolia.cms.core.Path#SELECTOR_DELIMITER) then the node will not be resolvable, because the tilde will be removed.

      How to reproduce

      1. Goto STK demo and open categories app
      2. Rename a category (e.g. Finance to Finance~) using the ~ character, activate changes
      3. Open localhost:8080/magnoliaPublic/demo-project/service/category~Finance~~.html
      4. Error will show that category cannot be found

      Source

      The ~ (tilde) is a reserved character due to being used as selector delimiter (see info.magnolia.cms.core.Path#SELECTOR_DELIMITER).

      Considered solutions

      • prevent entering the ~ as part of a page name e.g. by validation or
      • always sanitize the path (by replacing tilde with e.g. dash) upon storage.
      • support both selector or node-name when there's no ambiguity (and specify who should win otherwise)

        Acceptance criteria

              Unassigned Unassigned
              pmundt Philip Mundt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD