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

Glossary filter problems when regex chars in concepts

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: Glossary
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_13_STABLE

      Description

      see description in:

      http://moodle.org/mod/forum/discuss.php?d=7891

      special regex charecters are not quoted correctly in mod/glossary/filter.php function glossary_link_concepts

      maybe following could work:

      instead of line 124:

      $concept = str_replace(/, \/, $concept);

      use:

      $concept = preg_quote($concept, /);

      $concept = str_replace(\/, /, $concept);

      and comment out lines 184-186:

      $list_of_words_cp = str_replace('{', '{', $list_of_words_cp);

      $list_of_words_cp = str_replace('+', '+', $list_of_words_cp);

      $list_of_words_cp = str_replace('(', '(', $list_of_words_cp);

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: