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

Clean message text

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Messages
    • Labels:
    • Testing Instructions:
      Hide
      1. Send a message to another user using the messaging interface (user menu > messages)
      2. Confirm that sending script tags doesn't run the javascript on the page, e.g. sending <script>alert('test');</script> doesn't popup an alert (sending a message with only <script> tags will result in an empty message being rendered in the message area)
      3. Confirm that you can send html messages, e.g. <strong>test message</strong> should display the text "test message" in bold
      4. Confirm that the last message under the user name in the panel on the left is updated to plain text and doesn't have any HTML tags, e.g. in the script test above that text would say "alert('test');".
      5. Confirm that the last message in the message popover in the nav bar is displayed in plain text and doesn't have any HTML tags (assuming the last message had HTML tags). The popover should not error when opened. Note: unlike the last message in the messages panel the popover isn't updated dynamically as the user types, so you'll need to reload the page to have the last message updated.
      6. Confirm that the message timestamp is shown on a new line (bottom right) of the message, not inline with the text, when you send HTML messages (check this on clean and boost themes).
      Show
      Send a message to another user using the messaging interface (user menu > messages) Confirm that sending script tags doesn't run the javascript on the page, e.g. sending <script>alert('test');</script> doesn't popup an alert (sending a message with only <script> tags will result in an empty message being rendered in the message area) Confirm that you can send html messages, e.g. <strong>test message</strong> should display the text "test message" in bold Confirm that the last message under the user name in the panel on the left is updated to plain text and doesn't have any HTML tags, e.g. in the script test above that text would say "alert('test');". Confirm that the last message in the message popover in the nav bar is displayed in plain text and doesn't have any HTML tags (assuming the last message had HTML tags). The popover should not error when opened. Note: unlike the last message in the messages panel the popover isn't updated dynamically as the user types, so you'll need to reload the page to have the last message updated. Confirm that the message timestamp is shown on a new line (bottom right) of the message, not inline with the text, when you send HTML messages (check this on clean and boost themes).
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-56252-master

      Description

      Make a decision whether we allow html tags in new messaging interface and clean the user input.

      Please remember that html is allowed when message is sent through bulk messaging form on participants page

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16