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

The search highlighting is too rigorous and breaks HTML

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 1.9.1
    • None
    • MOODLE_19_STABLE

      I have created a field in a database activity in which people can type in a name of country. In my list template I then have the following:

      <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=[[placementcountry]]&mrt=all&ie=UTF8" target="_blank">[[placementcountry]]</a>

      This creates a link to a Google Maps page with the country. This all works fine until I start searching for one of the countries. Let's search for "Morocco". This is the HTML before the search:

      <a target="_blank" href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=Morocco&mrt=all&ie=UTF8">Morocco</a>

      After the search Moodle highlight where it has found the search terms, breaking the link in the process (pity!):

      <a highlight="" href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=<span class=">Morocco&mrt=all&ie=UTF8" target="_blank"><span class="highlight">Morocco</span></a>

      I can imagine this might be quite hard to fix, but a fix would sure be nice.

      Kind regards,

      Hans

            stronk7 Eloy Lafuente (stronk7)
            hansdezwart Hans de Zwart (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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