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

Escape possible regex delimiters in 'allowedsources' setting for H5P

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8
    • Fix Version/s: None
    • Component/s: Filters, H5P
    • Labels:
    • Affected Branches:
      MOODLE_38_STABLE

      Description

      We do not have any way to escape the admin-configured values.
      For example, the following could be configured in Site admin -> Plugins -> Filters -> Display H5P:

       

      https://h5p.example.com/([id/embed
      https://h5p.org/h5p/embed/[id]
      https://*.h5p.com/content/[id]/embed
      https://*.h5p.com/content/[id]

       

      I suspect that we need to do some or all of the following:

      1. Allow the administrator to provide the regex delimiters (currently added as a # in code)
      2. Test the regex on save for validity
      3. Improve the documentation for this setting
      4. Something else...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              amaia Amaia Anabitarte
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: