Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-73318

Component Library JS eval uses innerHTML, should use innerText

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.0
    • 4.0
    • Component Library
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-73318-master
    • Hide
      1. Build the component library

        grunt componentlibrary
        

      2. Navigate to Site adminsitration -> Development -> UI Component library
      3. Look through the Moodle -> Javascript pages
        1. Confirm that they all work
      4. Apply the attached patch:

        git am 0001-MDL-73318-DO-NOT-COMMIT.patch
        

      5. Rebuild the component library

        grunt componentlibrary
        

      6. Navigate to the Moodle -> Javascript -> Emojipicker page
        1. Confirm that it still works
        2. Confirm that there are no errors shown in the JS console
      Show
      Build the component library grunt componentlibrary Navigate to Site adminsitration -> Development -> UI Component library Look through the Moodle -> Javascript pages Confirm that they all work Apply the attached patch: git am 0001-MDL-73318-DO-NOT-COMMIT.patch Rebuild the component library grunt componentlibrary Navigate to the Moodle -> Javascript -> Emojipicker page Confirm that it still works Confirm that there are no errors shown in the JS console

      The innerHTML contains escaped values, i.e. => becomes => which makes it impossible to write example JS using ES6.

      We should use innerText instead.

        1. 0001-MDL-73318-DO-NOT-COMMIT.patch
          0.9 kB
        2. error_emojipicker.png
          error_emojipicker.png
          107 kB
        3. MDL-73318_step 3_1.png
          MDL-73318_step 3_1.png
          122 kB
        4. MDL-73318_step 3_2.png
          MDL-73318_step 3_2.png
          113 kB
        5. MDL-73318_step 3_3.png
          MDL-73318_step 3_3.png
          106 kB
        6. MDL-73318_step 6.png
          MDL-73318_step 6.png
          184 kB

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Bas Brands Bas Brands
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 35 minutes
                1h 35m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.