Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-24365

PRE elements containing a textnode with only white space is erroneously considered empty by core tinymce code

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 4.1.3
    • None
    • None
    • None

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      The tinymce.html.Node.isEmpty() is broken in that it will consider the following to be empty:

      <pre>    </pre>
      

      Even though it is meant to preserve white space for elements like PRE where white space is significant.

      The fix is to change the signature of the method from isEmpty(nonEmptyElements) to isEmpty(schema).

      The schema will provide the implementation of the isEmpty method access to:

      • nonEmptyElements via schema.getNonEmptyElements()
      • whiteSpaceElements (like PRE) via schema.getWhiteSpaceElements()

      The implementation should be fixed to respect both these kinds of elements.

            [CONFSERVER-24365] PRE elements containing a textnode with only white space is erroneously considered empty by core tinymce code

            There are no comments yet on this issue.

              dave@atlassian.com dave (Inactive)
              dave@atlassian.com dave (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: