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

WYSIWYG may loose or change style attribute, depending on browser used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 2.2.2
    • WYSIWYG Editor
    • None

    Description

      Here are my test case:

      (% style="border: solid 1px black;" %)
      This paragraph is prefixed by a style attribute containing a valid CSS style "border: solid 1px black"
      
      (% style="break-after: page" %)
      This paragraph is prefixed by a non-html style: break-after: page
      
      (% style="border: solid 1px black; pouet: coin;" %)
      This paragraph is prefixed by a style attribute containing a valid CSS style "border: solid 1px black" and an invalid css style "pouet: coin;"
      
      (% pouet=coin %)
      This paragraph is prefixed by a non-html attribute: pouet="coin"
      

      The attribute 'pouet' is kept by all browser, its value being surrounded by quotes, which is nice.
      But regarding the style attribute, the result differ depending on the browser.

      The worse thing is with FF which simply drop unsupported style. This may seems minor, but it has the side effect of being unable to define style for different rendering system in a single document, and currently we use our sample to create page break in PDF export.

      IE keeps the unknown attributes, but it expands 'border' into 'border-left','border-right', and so on... which create a very garbaged and long style for a simple requirement.

      FF keeps 'border' but change the order of the syntax. This is minor.

      Safari and Chrome doesn't change anything which is my expected behaviour.

      I joint an exported document with revisions showing the changes for each browsers.

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            softec Denis Gervalle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: