-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.2.7, 4.3.4, 4.4
-
MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
When in list view mode of Moodle's database activity, custom URLs constructed from "short text" fields break when the text highlighting feature is applied to filter or search results. This occurs because the <span class="highlight"> tag is applied to all placeholders (e.g., [[custom field]]) before being inserted into the template.
How to reproduce the problem:
- Create a database activity.
- Create a "short text" field named "link."
- In the "List view template," add the HTML code <a href="https://www.google.com/search?q=[[link]]" target="_blank" rel="noopener">Click to search about [[link]]</a> and then save the template.
- Add an entry and input the text "moodle," then save and return to the "List view."
- In the "Search" field, type "moodle" and press Enter.
This issue limits creativity in using the activity. I've been using placeholders not only to construct URLs but also to add as CSS classes for customizing the look and feel.
Suggestion: Offer an option to completely disable the text highlighting feature in the activity, providing users with more control over customization.
- will be (partly) resolved by
-
MDL-15550 The search highlighting is too rigorous and breaks HTML
-
- Closed
-