Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6162

Improve TemplatingFunctions#externalLink: Handle # anchor links and escape the link to prevent injection attack

    XMLWordPrintable

Details

    Description

      Using "external links" for anchors is currently the only way to manually create a TOC. When using the method info.magnolia.templating.functions.TemplatingFunctions#externalLink(javax.jcr.Node, java.lang.String) when only providing an anchor #anchor the link is prepended with http:// resulting in a broken link http://#anchor. Anchors should not be prepended with http://. Links should also be escaped.

      Also the link should be escaped to prevent injection attack.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD