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

"Activity names auto-linking" filter and activity name like "-" (hyphen) breaks course content visualization

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.6, 3.6.4, 3.7, 3.8, 3.9
    • Fix Version/s: 3.8.2, 3.7.5
    • Component/s: Filters
    • Labels:
    • Testing Instructions:
      Hide
      1. Navigate to Plugins > Filters > Manage filters
      2. Ensure the Activity names auto-linking filter is active (set to On)
      3. In a course, create an assignment activity named '-' (single hyphen)
      4. Create a label resource, with the content "This is a label"
      5. Confirm label displays correctly on course page
      6. Create a second label resource, with the content "Here's a link to the - assignment"
      7. Confirm label displays correctly on course page, and the '-' character is a link to the assignment in step 3
      Show
      Navigate to Plugins > Filters > Manage filters Ensure the Activity names auto-linking filter is active (set to On ) In a course, create an assignment activity named '-' (single hyphen) Create a label resource, with the content " This is a label " Confirm label displays correctly on course page Create a second label resource, with the content " Here's a link to the - assignment " Confirm label displays correctly on course page, and the '-' character is a link to the assignment in step 3
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull 3.6 Branch:
    • Pull 3.7 Branch:
    • Pull Master Branch:

      Description

      Steps to reproduce

      • Make sure "Activity names auto-linking" filter is active at site and course level.
      • In a course, create an Assignment and set name to "-".
      • In the same course create a label with some content and return to course.
      • You should see label's content broken.

      What actually happens

      • "Activity names auto-linking": on.
      • Assignment's name "-".
      • Label's original content:  "This is a label".
      • Wrong visualization of label's content: "<%1-%0%><%2%1%>This is a label<%3%2%><%4%3%><%5%-4%>".
        • Each of the hyphens is a link pointing to the task named "-".
        • This behavior affects the descriptions shown in the course of each resource or activity.
        • If you switch off "Activity names auto-linking", content turns readable.

      Expected

      • "Activity names auto-linking": on.
      • Assignment's name "-".
      • Label's original content:  "This is a label".
      • Correct visualization of label's content: "This is a label".

       

        Attachments

        1. filter-off.png
          filter-off.png
          6 kB
        2. filter-on.png
          filter-on.png
          10 kB
        3. MDL-65884.jpg
          MDL-65884.jpg
          11 kB

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Mar/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 35 minutes
                  1h 35m