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

incorrect regex searching for A tag

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.3
    • Component/s: General
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      $string = preg_replace('/(<a[^>]?>)(.?)(<\/a>)/is','$2',$string);
      matches <applet tag too

      thanks ELoy for volunteering, I and going to fix format_string() with \s after 'a'

        Gliffy Diagrams

          Activity

          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Found occurrences in:

          lib/filterlib.php
          lib/html2text.php
          mod/book/lib.php
          mod/glossary/lib.php

          all them should be ok now. The book and htm2text ones are slightly different from simply adding \s.

          Ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Found occurrences in: lib/filterlib.php lib/html2text.php mod/book/lib.php mod/glossary/lib.php all them should be ok now. The book and htm2text ones are slightly different from simply adding \s. Ciao
          Hide
          skodak Petr Skoda added a comment -

          thanks!

          Show
          skodak Petr Skoda added a comment - thanks!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Oct/08