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

Percentage widths getting stripped for some roles.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: HTML and CSS
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      We have an image header that has style="width:100%".  As a teacher and admin, the image shows as expected.  Even when "viewed as student" the image looks correct.

      However, when I log in as an actual student the image has the width:100% stripped out and the image displays too large.

      It isn't all or only css though.  If the image is given style="width:1000px", the image displays as expected for all users.  In fact, if I have style="width:100%;max-height:300px" only the width style is removed.  Also, if I use just the not CSS width = "100%", it strips that out as well.   

      Also, to be clear, when I say "strips out", I mean upon rendering.  When I go back to edit, the code is still there.  

       

      Overview:

      <img src="x.jpg" width="850px" /> <-works

      <img src="x.jpg" style="width: 850px" /> <- works

      <img src="x.jpg" width="100%" /> <-does NOT work

      <img src="x.jpg" style="width: 100%" /> <- does NOT works

       

        Attachments

        1. 1.jpg
          1.jpg
          278 kB
        2. 2.jpg
          2.jpg
          249 kB
        3. student.jpg
          student.jpg
          158 kB
        4. teacher.jpg
          teacher.jpg
          121 kB

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                syxton Matthew Davidson
                Participants:
                Component watchers:
                Amy Groshek, David Scotson, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: