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

& is systematically replaced by & a m p ; when we use the pencil for document name in topic

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.3.4, 2.4.1
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      Hide
      • Open Course & Turn editing on
      • Use the 'Update title' tool to update the title to the following:
      Text you put in What you expect to see What you get when you click the edit button Notes
      Horse & Cart Horse & Cart Horse & Cart & is converted to & by format_string and then back again by html_entity_decode
      Horse & <b>Cart</b> Horse & Cart Horse & Cart <b> is stripped out by format_string but & is not
      Horse & Cart Horse & Cart Horse & Cart nbsp is not stripped out anywhere
        • Confirm that they're all correct

      You may also wish to try a few other strings; and to try putting some strings in the modedit form too.

      Show
      Open Course & Turn editing on Use the 'Update title' tool to update the title to the following: Text you put in What you expect to see What you get when you click the edit button Notes Horse & Cart Horse & Cart Horse & Cart & is converted to & by format_string and then back again by html_entity_decode Horse & <b>Cart</b> Horse & Cart Horse & Cart <b> is stripped out by format_string but & is not Horse & Cart Horse & Cart Horse & Cart nbsp is not stripped out anywhere Confirm that they're all correct You may also wish to try a few other strings; and to try putting some strings in the modedit form too.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-36918-master

      Description

      in a topic, i want to change the name of document or activity
      when i write "&" it's automatically changed by "& a m p ;" after validation...

        Gliffy Diagrams

          Activity

          Hide
          lsansone Luiggi Sansonetti added a comment -

          hi
          thanks, i'll test these words

          Show
          lsansone Luiggi Sansonetti added a comment - hi thanks, i'll test these words
          Hide
          lsansone Luiggi Sansonetti added a comment -

          Well

          1.1. i write "Horse & Cart" and it's converted to "Horse & amp; Cart" (without space)
          1.2. i update the web page OR i turn editing off, and it's converted to "Horse & Cart" perfectly

          2.1. i write "Horse & <b>Cart</b>" and it's converted to "Horse & amp ; Cart" (without space and without b)
          2.2. i update the web page OR i turn editing off, and it's converted to "Horse & Cart" perfectly

          so it's ok just after editing off or updating web page

          Thank you very much

          Show
          lsansone Luiggi Sansonetti added a comment - Well 1.1. i write "Horse & Cart" and it's converted to "Horse & amp; Cart" (without space) 1.2. i update the web page OR i turn editing off, and it's converted to "Horse & Cart" perfectly 2.1. i write "Horse & <b>Cart</b>" and it's converted to "Horse & amp ; Cart" (without space and without b) 2.2. i update the web page OR i turn editing off, and it's converted to "Horse & Cart" perfectly so it's ok just after editing off or updating web page Thank you very much
          Hide
          dobedobedoh Andrew Nicols added a comment -

          Luiggi,

          The testing instructions provided are the instructions for testing the functionality of the patch I have provided.

          Upon investigation, this bug was only in the display of the content, and not the storage. After renaming, just refreshing the page will show that it is indeed correct.

          Andrew

          Show
          dobedobedoh Andrew Nicols added a comment - Luiggi, The testing instructions provided are the instructions for testing the functionality of the patch I have provided. Upon investigation, this bug was only in the display of the content, and not the storage. After renaming, just refreshing the page will show that it is indeed correct. Andrew
          Hide
          lsansone Luiggi Sansonetti added a comment -

          sorry...

          done with the patch

          1.1. i write "Horse & Cart" and it's converted to "Horse & Cart" --> it's ok !
          2.1. i write "Horse & <b>Cart</b>" and it's converted to "Horse & Cart" --> it's ok !

          thanks

          Show
          lsansone Luiggi Sansonetti added a comment - sorry... done with the patch 1.1. i write "Horse & Cart" and it's converted to "Horse & Cart" --> it's ok ! 2.1. i write "Horse & <b>Cart</b>" and it's converted to "Horse & Cart" --> it's ok ! thanks
          Hide
          rajeshtaneja Rajesh Taneja added a comment -

          Thanks Andrew,

          Patch looks good. Pushing for integration review.
          [y] Syntax
          [y] Output
          [y] Whitespace
          [-] Language
          [-] Databases
          [y] Testing
          [-] Security
          [-] Documentation
          [y] Git
          [y] Sanity check

          Show
          rajeshtaneja Rajesh Taneja added a comment - Thanks Andrew, Patch looks good. Pushing for integration review. [y] Syntax [y] Output [y] Whitespace [-] Language [-] Databases [y] Testing [-] Security [-] Documentation [y] Git [y] Sanity check
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Thanks Andrew, this has been integrated now.

          Just noting your branches has several other commits on them, I just cherry-picked the commits relating to MDL-36918.

          Many thanks
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Thanks Andrew, this has been integrated now. Just noting your branches has several other commits on them, I just cherry-picked the commits relating to MDL-36918 . Many thanks Sam
          Hide
          andyjdavis Andrew Davis added a comment -

          Works as described. Passing.

          Show
          andyjdavis Andrew Davis added a comment - Works as described. Passing.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

          Closing, ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jan/13