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

broken nolink tag support in text filtering

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-79360/401
    • MDL-79360/403
    • Hide

      use span tag with nolink class

      Show
      use span tag with nolink class
    • Hide
      1. Create some activities
      2. Make sure you use atto editor
      3. make sure activity name linking is enabled (should be enabled by default)
      4. Create some page that mentions activity names and wrap some of them with <nolink> tags. I.e. smth like "<nolink>activityname</nolink>"
      5. Confirm that the nolinked parts are not linked to activities
      Show
      Create some activities Make sure you use atto editor make sure activity name linking is enabled (should be enabled by default) Create some page that mentions activity names and wrap some of them with <nolink> tags. I.e. smth like "<nolink>activityname</nolink>" Confirm that the nolinked parts are not linked to activities

      MDL-77525 introduced a regression in text filtering where <nolink> tags stop working.

      solution should be:

      public function filter_text($text, $context, array $options = array(),
              array $skipfilters = null) {
          $text = $this->apply_filter_chain($text, $this->get_text_filters($context), $options, $skipfilters);
          if (!isset($options['stage']) || $options['stage'] === 'post_clean') {
              // Remove <nolink> tags for XHTML compatibility.
              $text = str_replace(array('<nolink>', '</nolink>'), '', $text);
          }
          return $text;
      }
       

            skodak Petr Skoda
            skodak Petr Skoda
            Farhan Karmali Farhan Karmali
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 5 minutes
                1h 5m

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