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

Escape possible regex delimiters in 'allowedsources' setting for H5P

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.8
    • None
    • Filters, H5P
    • 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

              Unassigned Unassigned
              amaia Amaia Anabitarte
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: