instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.54k stars 2.46k forks source link

Automatic correction in embed codes when using RCE #1551

Open martinlarsson opened 4 years ago

martinlarsson commented 4 years ago

Summary:

When using the RCE to embed a playlist (showcase) from Vimeo the address is automatically rewritten to reflect the embedding of a video. Playlists must now be embedded using the HTML mode of the editor.

Steps to reproduce:

  1. Edit a page.
  2. Click the "Insert/edit media" button.
  3. Switch to the embed tab.
  4. Paste the embed code for a Vimeo playlist, for example: <iframe src="https://vimeo.com/showcase/6198826/embed"></iframe>
  5. Click Ok.

Expected behavior:

The playlist (showcase) from the supplied link (with id: 6198826) should be embedded in the page.

Actual behavior:

A video with the id (6198826) is embedded. <iframe src="//player.vimeo.com/video/6198826?title=0&amp;amp;byline=0" width="425" height="350"></iframe>. Playlist id is used as video id.

Additional notes:

Pasting the embed code directly into the HTML code of the page using the HTML mode of the editor works fine. The problem seems to be that a vimeo.com address is always parsed and parts of it is used to create a player.vimeo.com/video/id address. Pasting in HTML mode is a workaround but is always perceived as scary or dangerous for the non-technical user.

stale[bot] commented 2 years ago

Thanks for contributing to this issue. As it has been 2 years since the last activity, we are automatically closing the issue in 30 days. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please respond before the issue is closed, or post a message on the mailing list. We'll gladly take a look again!