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

Edge case in message preview

XMLWordPrintable

    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-66912-master
    • Hide
      1. Create a new site (we need it fresh to guarantee the user's personal messaging space is in the vanilla state)
      2. Log in as the admin
      3. Enable the 'trusttext' admin setting
      4. Enable the 'messagingallusers' admin setting (site wide messaging)
      5. Enrol 8 students in a course.
      6. Now, via the messaging pane, search for each student and send the following messages, one to each student (just copy and paste the HTML into the 'write a message' text entry field):
        • Image:

          <img src="https://image.shutterstock.com/image-vector/black-cat-silhouette-elegant-sitting-260nw-735404302.jpg" alt="small cat icon">

        • Video:

          <video src="https://mdn.github.io/learning-area/html/multimedia-and-embedding/video-and-audio-content/rabbit320.webm" controls>
                <p>Your browser doesn't support HTML5 video. Here is a <a href="rabbit320.webm">link to the video</a> instead.</p> 
              </video>

        • Audio:

          <audio controls src="https://interactive-examples.mdn.mozilla.net/media/examples/t-rex-roar.mp3"><p>Your browser doesn't support HTML5 aduio. Here is a <a href="rabbit320.webm">link to the video</a> instead.</p> </audio>

        • Iframe content (Fallback case):

          <iframe id="inlineFrameExample" title="Inline Frame Example" src="https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776%2C0.00030577182769775396%2C51.478569861898606&amp;layer=mapnik" width="300" height="200"></iframe>

        • Other media (fallback case):

          <embed src="https://html.com/wp-content/uploads/flamingo.jpg></embed>

        • Texty 1:

          This is just a normal message

        • Texty 2 (formatted)

          <span style="font-weight:bold">This message is bold</span>

        • Texty with src word

          src

      7. Now, open dev tools in your browser and reload the page.
      8. Open the messaging pane, and expand the private conversations tab (if not already done)
      9. Verify the following:
        • All conversations are present in the section and no errors appear in the dev tools console.
        • You see one conversation with a "<ICON> Image" description
        • You see one conversation with a "<ICON> Video" description
        • You see one conversation with a "<ICON> Audio" description
        • You see two conversations with a "<ICON> Other media" description
        • You see one conversation with "This is just a normal message" description
        • You see one conversation with "This message is bold" description, but the message is NOT bold.
        • You see one conversation with "src" description.
      Show
      Create a new site (we need it fresh to guarantee the user's personal messaging space is in the vanilla state) Log in as the admin Enable the 'trusttext' admin setting Enable the 'messagingallusers' admin setting (site wide messaging) Enrol 8 students in a course. Now, via the messaging pane, search for each student and send the following messages, one to each student (just copy and paste the HTML into the 'write a message' text entry field): Image: <img src="https://image.shutterstock.com/image-vector/black-cat-silhouette-elegant-sitting-260nw-735404302.jpg" alt="small cat icon"> Video: <video src="https://mdn.github.io/learning-area/html/multimedia-and-embedding/video-and-audio-content/rabbit320.webm" controls> <p>Your browser doesn't support HTML5 video. Here is a <a href="rabbit320.webm">link to the video</a> instead.</p> </video> Audio: <audio controls src="https://interactive-examples.mdn.mozilla.net/media/examples/t-rex-roar.mp3"><p>Your browser doesn't support HTML5 aduio. Here is a <a href="rabbit320.webm">link to the video</a> instead.</p> </audio> Iframe content (Fallback case): <iframe id="inlineFrameExample" title="Inline Frame Example" src="https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776%2C0.00030577182769775396%2C51.478569861898606&amp;layer=mapnik" width="300" height="200"></iframe> Other media (fallback case): <embed src="https://html.com/wp-content/uploads/flamingo.jpg></embed> Texty 1: This is just a normal message Texty 2 (formatted) <span style="font-weight:bold">This message is bold</span> Texty with src word src Now, open dev tools in your browser and reload the page. Open the messaging pane, and expand the private conversations tab (if not already done) Verify the following : All conversations are present in the section and no errors appear in the dev tools console. You see one conversation with a "<ICON> Image" description You see one conversation with a "<ICON> Video" description You see one conversation with a "<ICON> Audio" description You see two conversations with a "<ICON> Other media" description You see one conversation with "This is just a normal message" description You see one conversation with "This message is bold" description, but the message is NOT bold. You see one conversation with "src" description.

      MDL-66226 fixed the display of message previews, but there's an edge case where a user could enter a message in plain text which contains the word "src" and the preview will be shown as "Other media".

      This could cause some confusion with users so we'll have to properly fix this.

            jaked Jake Dallimore
            jpataleta Jun Pataleta
            Peter Dias Peter Dias
            Jun Pataleta Jun Pataleta
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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