Moodle
  1. Moodle
  2. MDL-36918

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

    Details

    • 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
    • Rank:
      46455

      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...

        Activity

        Hide
        Luiggi Sansonetti added a comment -

        hi
        thanks, i'll test these words

        Show
        Luiggi Sansonetti added a comment - hi thanks, i'll test these words
        Hide
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        Andrew Davis added a comment -

        Works as described. Passing.

        Show
        Andrew Davis added a comment - Works as described. Passing.
        Hide
        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
        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: