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

Ampersand breaks auto-linking in Glossary

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.1, 2.4.6, 2.5.2
    • 2.4.7, 2.5.3
    • Filters, Glossary
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MDL-34654-master
    • Hide

      Note: For format_string text it generally is supposed to work whether or not you type the &

      1. Create new course or use existing. Go to Filter settings and check that 'Glossary auto-linking' is set to On. (This might also require a change to system settings if it isn't enabled at site level.)
      2. Create new Glossary. Type a name and description and select 'Main glossary' for 'Glossary type', then hit 'Save and display'.
      3. Add a new entry. Under Concept type 'D&D'; under Definition type 'Dungeons and Dragons'. Turn on 'This entry should be automatically linked' and save.
      4. Add another new entry. Under Concept type 'T&C'; under Definition type 'Terms and conditions'. Turn on the autolink option and save.
      4. Back on course page, create a new Page activity. Type a name and description and under Content, type 'What is D&D? How about T&C?'. Save and display.

      EXPECTED: Both terms should be highlighted as links. The tooltips for both terms should display correctly (without '&' HTML code). When you ctrl-click on both terms to open in a new tab, the relevant glossary entry should display.

      (NOTE: Due to what appears to be a separate bug in current master, normal left clicks on glossary links do not work on my system anyhow even if they don't have ampersands in, so I'm not including that in this issue.)

      Show
      Note: For format_string text it generally is supposed to work whether or not you type the & 1. Create new course or use existing. Go to Filter settings and check that 'Glossary auto-linking' is set to On. (This might also require a change to system settings if it isn't enabled at site level.) 2. Create new Glossary. Type a name and description and select 'Main glossary' for 'Glossary type', then hit 'Save and display'. 3. Add a new entry. Under Concept type 'D&D'; under Definition type 'Dungeons and Dragons'. Turn on 'This entry should be automatically linked' and save. 4. Add another new entry. Under Concept type 'T&C'; under Definition type 'Terms and conditions'. Turn on the autolink option and save. 4. Back on course page, create a new Page activity. Type a name and description and under Content, type 'What is D&D? How about T&C?'. Save and display. EXPECTED: Both terms should be highlighted as links. The tooltips for both terms should display correctly (without '&' HTML code). When you ctrl-click on both terms to open in a new tab, the relevant glossary entry should display. (NOTE: Due to what appears to be a separate bug in current master, normal left clicks on glossary links do not work on my system anyhow even if they don't have ampersands in, so I'm not including that in this issue.)

    Description

      Problem: A Glossary item containing an ampersand (&) character breaks auto-linking.

      Tested by removing and then adding the ampersand again, and behaviour is consistent with the & being the problem.

      We use APA style and are trying to use a glossary for a list of references. APA style uses this format for articles with multiple authors: eg. "Cooper, Orrell, & Bowden, 2003"

      Attachments

        Issue Links

          Activity

            People

              quen Sam Marshall
              scop Timothy Allen
              Jason Fowler Jason Fowler
              Damyon Wiese Damyon Wiese
              Petr Skoda Petr Skoda
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Nov/13