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

img tag attributes getting mangled in HTML Editor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a bug
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.7.2, 1.8
    • Component/s: HTML Editor (TinyMCE)
    • Labels:
      None
    • Environment:
      Moodle 1.7+
      Hosted on Ubuntu Dapper with Oracle (OCI8PO) Database backend (using new 1.7 functionality).
      Apache2 + PHP5 (MySQL not present)
      Browsers tested: Firefox 2.0 on Kubuntu Edgy + Firefox 1.5 on Windows XP
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      To reproduce:

      Create a course, turn editing on, use the HTML editor to edit one of the course topics (this bug may apply outside of just courses though).

      Insert an image into the topic via the HTML editor's "insert image dialogue". Upload the image file and link to it, inserting alt text etc.

      OK this and close the HTML editor. The image displays correctly on the page. Now re-enter the HTML editor, select the image and edit its properties in the image dialogue again.

      The bug presents itself as additional characters appearing at the beginning and end of the URL and alt text (looks like fragments of some escape characters that were used).

      For example: Our image URL
      http://edweb2/file.php/81/LRC_pic_19.jpg

      Is transformed to this:
      \"http://edweb2/file.php/81/LRC_pic_19.jpg\"

      It appears that each time the HTML editor is closed (saving the page) and then re-opened, the image tag gets mangled again in the same way, adding more extra characters.

      Whilst I can manually fix images, by removing the extra characters, general staff (with no knowledge of HTML) can't, and are asking me why their images break when they return to the editor to make a change.
      Apologies that I can't link you directly to our Moodle install, but we are still waiting on our network admins to furnish us with remote access.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              cfowler Craig Fowler
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/Mar/07