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

block_html get_content_for_external method is not calculating correctly when content is trusted for the mobile app

XMLWordPrintable

    • MOODLE_500_STABLE

      Steps to reproduce:

      • Access as a non-admin user
      • Go to your Dashboard
      • Add a "Text (html)" block with an iframe pointing to a Youtube video (using its embed code for example)
      • Open the Dashboard using the mobile app

      Expected:

      • The video is played

      The problem is that get_content_for_external() for block_html is using the content_is_trusted() method that checks the current page using the global $SCRIPT

      The previous is not going to work for web services as $SCRIPT won't indicate my/index.php, instead, it will return the Web Service rest endpoint.

      To solve this issue, we will have to effectively calculate for which page get_content_for_external is being called or add additional parameters in the method signature to force format_text options.

            jleyva Juan Leyva
            jleyva Juan Leyva
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

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