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

Filter out html from string contents added to search

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1
    • 3.1
    • Global search
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-54627_master
    • Hide
      1. Enable multilang filter at system level for content and headings
      2. Add an activity in your frontpage containing multilang tags in both the name and description
        • You can use this sting: <span lang="en" class="multilang">is english ok?</span><span lang="ca" class="multilang">is català ok?</span><span lang="es" class="multilang">is español ok?</span><span lang="fr" class="multilang">is français ok?</span>
      3. Setup search (https://docs.moodle.org/31/en/Global_search) and index your site's contents
      4. Search one of the words that is contained in the activity you previously added (note that the first and last word of each multilang tag may be merged when converting HTML to plain text, so better use words in the middle)
      5. The result in search/index.php title and description should contain all languages contents merged together and you should see the result with no tags in the title nor description
      Show
      Enable multilang filter at system level for content and headings Add an activity in your frontpage containing multilang tags in both the name and description You can use this sting: <span lang="en" class="multilang">is english ok?</span><span lang="ca" class="multilang">is català ok?</span><span lang="es" class="multilang">is español ok?</span><span lang="fr" class="multilang">is français ok?</span> Setup search ( https://docs.moodle.org/31/en/Global_search ) and index your site's contents Search one of the words that is contained in the activity you previously added (note that the first and last word of each multilang tag may be merged when converting HTML to plain text, so better use words in the middle) The result in search/index.php title and description should contain all languages contents merged together and you should see the result with no tags in the title nor description

      multilang filter can be enabled also for headings like the course fullname or an activity name, so they can contain HTML. We are not passing these text through content_to_text so the span tags would be indexed and displayed as text, this is not nice.

            dmonllao David Monllaó
            dmonllao David Monllaó
            Frédéric Massart Frédéric Massart
            Dan Poltawski Dan Poltawski
            Jake Dallimore Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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