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

convert_urls_into_links() is converting inside image tags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.8
    • 1.9.7
    • Usability
    • None
    • Any
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      It appears that the convert_urls_into_links() function is converting URLs that are inside image tags. For instance, it converts this:

      <img src="http://moodle.org/logo/logo-240x60.gif" />

      into this:

      <img src="<a href="http://moodle.org/logo/logo-240x60.gif" target="_blank">http://moodle.org/logo/logo-240x60.gif</a>" />

      I can confirm that it is the convert_urls_into_links() function that's causing this by commenting out line ~2246 of lib/weblib.php that reads:

      convert_urls_into_links($text);

      With that line commented out, the images display as expected with the correct HTML.

      P.S. I'm assuming this has to do with the changes made in MDL-20826, but I wasn't sure whether or not I should create a new issue since that one is "Resolved."

        1. convert_urls_into_links.patch
          3 kB
          Jonathan Robson
        2. testweblib.patch
          1 kB
          Andrew Davis
        3. weblib.patch
          0.9 kB
          Andrew Davis
        4. quiz_buggy_description.txt
          0.6 kB
          Patrick Pollet
        5. patch.txt
          3 kB
          Matthew Davidson
        6. patched.php
          254 kB
          Matthew Davidson
        7. patched2.php
          254 kB
          Matthew Davidson
        8. Broken links.jpg
          65 kB
          Mauno Korpelainen

            andyjdavis Andrew Davis
            jnrbsn Jonathan Robson (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            8 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

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