Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-38867

FormattedText does not allow valueless or data-* attributes

    XMLWordPrintable

Details

    • Bug
    • Status: CLOSED
    • Major
    • Resolution: Fixed
    • 2.9.x
    • 10.0
    • Kernel
    • None
    • KNL-1007

    Description

      The attribute parsing in FormattedText does not allow for valueless attributes. These are most commonly used in forms (e.g., checked or selected attributes), and don't cause us trouble there because we do not accept form/input tags (and the XHTML workaround, e.g., checked="checked" is common anyway). However, in HTML5 code, valueless attributes are common. There is a related shortcoming, which is that data-* attributes are not supported.

      Supporting data-* attributes is not a simple matter of adding "data-*" to the acceptable attributes list, because of the wildcard. The change to that list is straightforward, adding data(?:-[A-Za-z]), but the parsing must also be changed to account for multiple instances of a pattern. While changing this parsing, it is straightforward to allow valueless attributes.

      The goal of supporting data-* attributes is to allow for reasonable widgets to be embedded by the rich text editor with their configuration data inline. The two initial examples of this are better video (YouTube, etc.) embedding and experimentation in supporting mathematical formula rendering (aside from the spotty MathML browser support).

      Gliffy Diagrams

        Zeplin

          Attachments

            Issue Links

              Activity

                People

                  noahbotimer Noah Botimer
                  noahbotimer Noah Botimer
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                    Created:
                    Updated:
                    Resolved:

                    Git Integration