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

in-place edit replaces <> with &lt;&gt; ,in title, when entering edit mode

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 12.5-rc-1
    • 12.4
    • Edit, REST
    • None
    • High
    • Medium
    • N/A
    • N/A

    Description

      When the title of a page contains < or > and you enter the in place edit mode the characters < and > are replaced with the html code for < and > . When I don't change it back to < and > the html code will be saved.

       

      Attachments

        Issue Links

          Activity

            [XWIKI-17438] in-place edit replaces <> with &lt;&gt; ,in title, when entering edit mode

            I fixed it by adding the "rawTitle" field to the Page REST resource.

            mflorea Marius Dumitru Florea added a comment - I fixed it by adding the "rawTitle" field to the Page REST resource.

            There's also the option to rely on the existing withPrettyNames request parameter but:

            • turning it on by default will make the default request a lot more expensive
            • it doesn't just lead to new fields being added, it also leads to fields being modified, which might be unexpected for existing code
            mflorea Marius Dumitru Florea added a comment - There's also the option to rely on the existing withPrettyNames request parameter but: turning it on by default will make the default request a lot more expensive it doesn't just lead to new fields being added, it also leads to fields being modified, which might be unexpected for existing code

            Since this behavior is pretty old we can't change it now without breaking existing code. Instead we need to:

            • either add a new field, like titleRaw
            • or add a request parameter to force the raw title
            mflorea Marius Dumitru Florea added a comment - Since this behavior is pretty old  we can't change it now without breaking existing code. Instead we need to: either add a new field, like titleRaw or add a request parameter to force the raw title

            The problem is actually that the Page REST resource returns the display title instead of the raw title. I didn't expect this.

            mflorea Marius Dumitru Florea added a comment - The problem is actually that the Page REST resource returns the display title instead of the raw title. I didn't expect this.

            People

              mflorea Marius Dumitru Florea
              r3d-5 Andreas Rosenstiel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: