Uploaded image for project: 'XWiki Infrastructure'
  1. XWiki Infrastructure
  2. XINFRA-147

Broken ColorThemes because of double URL encoding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • www.xwiki.org
    • None

    Description

      On xwiki.org we have a page on the main wiki xwiki:XWiki.XWikiOrgSkinExtension that is used in the subwiki's 'Administration - Page Elements' in the 'HTTP Meta Info' section.

      The call is:

      $xwiki.ssx.use("xwiki:XWiki.XWikiOrgSkinExtension", {'colorTheme': "${xcontext.database}:$!xwiki.getUserPreference('colorTheme')"})
      

      On the 5.2 xwiki.org version this call worked without problems and it was resolved for example in:

      http://www.xwiki.org/xwiki/bin/ssx/XWiki/XWikiOrgSkinExtension?language=en&colorTheme=commons%3AColorThemes.CommonsCT
      

      when called from http://commons.xwiki.org/.

      Example of CSS used (xwiki:XWiki.XWikiOrgSkinExtension):

      #template('colorThemeInit.vm')
      #headerglobal, #footerglobal  {
        background-color: $theme.pageHeaderBackgroundColor;
      }
      

      was transformed in

      #headerglobal,#footerglobal {
       background-color:#243825;
      }
      

      After the upgrade to 5.4, the call resolves to

      http://www.xwiki.org/xwiki/bin/ssx/XWiki/XWikiOrgSkinExtension?language=en&colorTheme=commons%253AColorThemes.CommonsCT
      

      There is a problem with the encoding.
      If until now ':' resolved to '%3A', now '%' is double encoded resulting in '%253A'.

      The resourse 'commons%253AColorThemes.CommonsCT' does not exists, thus xwiki:XWiki.XWikiOrgSkinExtension fallsback on the defaults (#fff)

      #headerglobal,#footerglobal {
       background-color:#fff;
      }
      

      Attachments

        1. bugged.png
          bugged.png
          64 kB
        2. doubleEncoding.png
          doubleEncoding.png
          74 kB
        3. htmlElementsHover.png
          htmlElementsHover.png
          66 kB
        4. working.png
          working.png
          70 kB

        Activity

          People

            vmassol Vincent Massol
            evalica Ecaterina Moraru (Valica)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: