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

Characters converted to HTML entities in the re-edited Markdown text field

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_28_STABLE, MOODLE_31_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-32114-401
    • MDL-32114-master
    • Moderate
    • Hide

      Setup

      1. Login as a user that can create or modify a course.
      2. Click the user icon in the top right corner, and in the drop down menu go to Preferences
      3. In the Editor preferences change the Text editor to "Plain text area"

      Test Instructions

      1. In a course create a new Forum post.
      2. Click on Add a new discussion topic, set an arbitraty title, use the file content from the attached file post_text_32114.txt as it is for the post and set the selection to Markdown format. Save your post and click to view it.
      3. Expected result: the block quotes and the code section should be rendered correctly, there must not appear any popup (in case of XSS attacks). Output should look very close to the screenshot mdl32114_parsed_output.png.
      4. Edit the post again as if you would want to do a correction
      5. Excpeted result: the markup appears as it was saved before i.e. the same content as in the file.
      6. Make some small changes an save the post again.
      7. Expected result: same as in step 3 except for the changes that you did before.

      Repeat the test procedure as well on:

      • A "Text and media area" activity/resource (this is the former label resource)
      • A "Page" activity/resource

      When entering the text from the file, select "Markdown format" and save the content.

      Note: the output of the "Text an Media area" looks a bit awkward (long lines have no appropriate line break) because this type is not suitable for long text. However the test case must passed as well.

      Show
      Setup Login as a user that can create or modify a course. Click the user icon in the top right corner, and in the drop down menu go to Preferences In the Editor preferences change the Text editor to "Plain text area" Test Instructions In a course create a new Forum post . Click on Add a new discussion topic, set an arbitraty title, use the file content from the attached file post_text_32114.txt as it is for the post and set the selection to Markdown format. Save your post and click to view it. Expected result: the block quotes and the code section should be rendered correctly, there must not appear any popup (in case of XSS attacks). Output should look very close to the screenshot mdl32114_parsed_output.png . Edit the post again as if you would want to do a correction Excpeted result: the markup appears as it was saved before i.e. the same content as in the file. Make some small changes an save the post again. Expected result: same as in step 3 except for the changes that you did before. Repeat the test procedure as well on: A "Text and media area" activity/resource (this is the former label resource) A "Page" activity/resource When entering the text from the file, select "Markdown format" and save the content. Note: the output of the "Text an Media area" looks a bit awkward (long lines have no appropriate line break) because this type is not suitable for long text. However the test case must passed as well.

      Steps to reproduce:
      1. Disable TinyMCE in your Moodle profile at moodle.org
      2. Compose a forum post in Markdown format, eg:

      > Block quote
      Something

      3. Save the form
      4. Edit the post

      Expected behavior:
      The text should appear in the textarea exactly as you typed it (following the "What You See Is What You Typed" principle). This has always been like that, 10 of 10 Markdown users say.

      What actually happens:

      • The > character is displayed as > entity, breaking the Markdown syntax.
      • The quote block is not recognized as such.

      Notes:
      I am not sure if the same affects other formats, too. Please try HTML format, too.

            strobotta Stephan Robotta
            mudrd8mz David Mudrák (@mudrd8mz)
            Mathew May Mathew May
            Paul Holden Paul Holden
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            22 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 33 minutes
                3h 33m

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