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

svg image in h5p content, no longer supported

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 4.3.7, 4.4.3, 4.5
    • H5P
    • None
    • MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE

      I got this error messages when trying to view a h5p activatie with a svg image in the content. And this dit work in the past.

       

      This broke our existing content.

      It seems that h5p documentation claims that svg should be supported.

      I looked into the code and noticed this change in h5p/h5plib/v127/joubel/core/h5p.classes.php

       

      Before:

      public static $defaultContentWhitelist = 'json png jpg jpeg gif bmp tif tiff svg eot ttf woff woff2 otf webm mp4 ogg mp3 m4a wav txt pdf rtf doc docx xls xlsx ppt pptx odt ods odp xml csv diff patch swf md textile vtt webvtt gltf glb';
      public static $defaultLibraryWhitelistExtras = 'js css'; 

      After

      public static $defaultContentWhitelist = 'json png jpg jpeg gif bmp tif tiff eot ttf woff woff2 otf webm mp4 ogg mp3 m4a wav txt pdf rtf doc docx xls xlsx ppt pptx odt ods odp csv diff patch swf md textile vtt webvtt gltf glb';
      public static $defaultLibraryWhitelistExtras = 'js css svg xml'; 

      In commit
      2d930e6e6b164c72bb26c05ad647db9624867e03 for main
      1550715d9b1a9bde38d2b63aa0a53469e29e4614 for MOODLE_404_STABLE
      b5b838e16b3b16856b09ce0e6ee1efdbe1ef1678 for MOODLE_403_STABLE

      If i add svg back to $defaultContentWhitelist, It works again for me.

      Is there a reason svg was removed from this?
      I hope this can be reverted so that svg in h5p content will work again.

            Unassigned Unassigned
            renssikma Rens Sikma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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