Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-26697 mediaplugin fixes and improvements META
  3. MDL-14782

filtering doesn't work when nothing between <a ...> and </a> tag

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0.3
    • 1.8.3, 1.9
    • Filters
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_20_STABLE

      hello,

      I use an application which generates html (validated). And filtering doesn't work. I find it is because there are in the document (I don't no exactly why) empty links followed by other links. That is for example:
      <a href="moodle.org></a>
      some words. A lot of words. <a href="moodle.org"> Moodle</a>

      No filter works between the two links.

      I found the problem : It is in the "filter_save_ignore_tags" function in the lib/filterlib.php.
      The regular expression use a "+" . If I put a "*" at the place, the problem was corrected.

      $pregexp = '/'.$opentag.'(.+?)'.$closetag.'/is';

      became :

      $pregexp = '/'.$opentag.'(.*?)'.$closetag.'/is';

      I don't know if it the ultime solution because I don't know why a "+" was used.

            skodak Petr Skoda
            testeur Etienne Rozé
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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