Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-8278

Issues When Using Special Characters Within Alt Text Attribute Of <img> Elements In A Rich Text Field Of A Content App's Detail SubApp Editor

XMLWordPrintable

    • Yes
    • Nucleus 1
    • 3

      There is an issue with creating alt text within <img> elements in a rich text field of a content app's editor. This happens when using special characters within the alt text i.e. “$”.

      Steps to Reproduce
      1 - Create a new rich text field within a content app’s detail subapp editor form (you can do this within the contact app for example. You can use my attached config)
      2 - Open content app to where you have the new rich text field you just created.
      3 - Click on the “Source” button within the rich text field
      4 - Create an <img> element with some alt text containing a special character (example : <img src="https://picsum.photos/200/300" alt="This value $9 may cause a problem when editing." >)
      5 - Click save

      6 - You will then get error message: " 'IndexOutOfBoundsException: No group x' error..." or if you reopen the content detail subapp you will see that the inputted element does not appear

      Expected Results
      No error is thrown when using an <img> element with alt text containing a special character. The element is saved and continues to persist on the rich text editor.

      Actual Results
      In one case you receive error:

      "IndexOutOfBoundsException: No group x" error...

      In another, the content will not persist within the rich text editor. However, the content does get stored within the JCR.

      Workaround
      Use the HTML entity of the character instead i.e. $

      Development Notes
      I was able to replicate the error only once by using the demo war for 5.7.6 and Tomcat 9.0.10. Attached ticket mentions that they keep getting the error though. Other times, the content would not appear on the rich text editor after clicking save. This is also seen in the demo (6.2.1 - not the error message but the blank content problem)

        Acceptance criteria

              thien.quach Quach Hao Thien
              jnodarse Julian Nodarse
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1d 0.5h
                    1d 0.5h