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

Embedding PeerTube videos stopped working due to the sandbox parameter getting cleaned

XMLWordPrintable

    • MOODLE_405_STABLE

      This may be a regression of Moodle 4.5 but I do not have an older version to compare with, but according to my older Moodle courses it must have worked in the past since they include the sandbox parameter and didn't have it cleaned. Also older links from PeerTube 6.x also already included the sandbox parameter  in the generated embeeding code which now appears to be cleaned by recent Moodle versions when pasting the embedding code.

      To reproduce simple go to https://framatube.org/videos/browse and pick any random video, click on the "Share" button and copy the embeeding code which will look like:

      <iframe title="how to do video editing in blender" width="560" height="315" src="https://framatube.org/videos/embed/b518e18e-6e15-47b6-99df-c013bc2aaaf0" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups allow-forms"></iframe>

      After pasting this into Moodle (View - Code) you'll immedtially see that the sandbox variable got cleaned:

      <p><iframe title="how to do video editing in blender"
          src="https://framatube.org/videos/embed/b518e18e-6e15-47b6-99df-c013bc2aaaf0"
          width="560" height="315" frameborder="0" sandbox=""
          allowfullscreen="allowfullscreen"></iframe></p>

      Which results in an error not being able to display/embed the videos into Moodle anymore. Showing an error like:

      This can also easily reproduced by simple HTML-Code:

       

       

      <!DOCTYPE html>
      <html>
      <body>
      <h1>Fails:</h1>
      <p style="text-align: center;"><iframe title="how to do video editing in blender"
          src="https://framatube.org/videos/embed/b518e18e-6e15-47b6-99df-c013bc2aaaf0"
          width="560" height="315" frameborder="0" sandbox=""
          allowfullscreen="allowfullscreen"></iframe></p>
       
      <h1>Works:</h1>
      <p style="text-align: center;"><iframe title="how to do video editing in blendern"
          src="https://framatube.org/videos/embed/b518e18e-6e15-47b6-99df-c013bc2aaaf0"
          width="560" height="315" frameborder="0" sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
          allowfullscreen="allowfullscreen"></iframe></p>
      </body>
      </html>
      

      showing that cleaning the sandbox parameter is causing the problem.

       

            Unassigned Unassigned
            tgurr Timo Gurr
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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