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

Bold and italics do not work with the NWIKI formatting

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.7, 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Wiki (2.x)
    • Labels:
    • Testing Instructions:
      Hide

      Note: This should be tested with patch from MDL-25883 and you should have firebug or error console for checking JS errors.

      1. Log in as Admin and turn editing on
      2. Select a course and add a wiki activity
      3. Select wiki activity and add a new NWIKI format page
      4. Click on comments tab and then click on add comment
      5. Open error console to check for javascript errors
      6. Type text and select/highlight text in comment box
      7. click on bold icon and you should not see any javascript error. Also '' should be suffixed and prefixed to selected text.
      8. Select text again and click italic icon and ''' should be suffixed and prefixed to selected text.
      Show
      Note: This should be tested with patch from MDL-25883 and you should have firebug or error console for checking JS errors. Log in as Admin and turn editing on Select a course and add a wiki activity Select wiki activity and add a new NWIKI format page Click on comments tab and then click on add comment Open error console to check for javascript errors Type text and select/highlight text in comment box click on bold icon and you should not see any javascript error. Also '' should be suffixed and prefixed to selected text. Select text again and click italic icon and ''' should be suffixed and prefixed to selected text.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-mdl-28101

      Description

      Bold and italics can't be inserted by the NWIKI format rich text editor because the markup (single quotes) isn't escaped.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting this.

            I've put it on our backlog and we'll try to get to it as soon as we can.

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting this. I've put it on our backlog and we'll try to get to it as soon as we can.
            Hide
            cfulton Charles Fulton added a comment -

            Updating with patches against all versions of 2.

            Show
            cfulton Charles Fulton added a comment - Updating with patches against all versions of 2.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Thanks for spot-on Patch Charels.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Thanks for spot-on Patch Charels.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Hi Guys,
            Altough this patch fixes the issue for comments section, but it breaks already working "main content area" of the Nwiki. After the patch bold and italics donot work in main content area.
            From the error console its evident that ' was already escaped for main content area, even before the patch. Here is dump of the error console with the patch applied:-

            Error: illegal character
            Source Code:
            insertTags('\\'\\'','\\'\\'','Bold text');

            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - Hi Guys, Altough this patch fixes the issue for comments section, but it breaks already working "main content area" of the Nwiki. After the patch bold and italics donot work in main content area. From the error console its evident that ' was already escaped for main content area, even before the patch. Here is dump of the error console with the patch applied:- Error: illegal character Source Code: insertTags('\\'\\'','\\'\\'','Bold text'); Thanks
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Thanks for detecting that Ankit.
            Can you please review new patch.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Thanks for detecting that Ankit. Can you please review new patch.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Hi Rajesh,
            Looks good now.
            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - Hi Rajesh, Looks good now. Thanks
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Thanks Ankit

            Show
            rajeshtaneja Rajesh Taneja added a comment - Thanks Ankit
            Hide
            nebgor Aparup Banerjee added a comment - - edited

            Hi Raj, could you add a quick description to the @return?

            or not: http://docs.moodle.org/dev/index.php?title=Coding_style&action=historysubmit&diff=32233&oldid=32199

            Show
            nebgor Aparup Banerjee added a comment - - edited Hi Raj, could you add a quick description to the @return? or not: http://docs.moodle.org/dev/index.php?title=Coding_style&action=historysubmit&diff=32233&oldid=32199
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Hello Aparup,

            Function descriptions talk about return value, do you want me to replicate this?

            Show
            rajeshtaneja Rajesh Taneja added a comment - Hello Aparup, Function descriptions talk about return value, do you want me to replicate this?
            Hide
            nebgor Aparup Banerjee added a comment -

            as long as its agreed and standard i've no issues : i've just added it here

            Show
            nebgor Aparup Banerjee added a comment - as long as its agreed and standard i've no issues : i've just added it here
            Hide
            nebgor Aparup Banerjee added a comment -

            ok this has now been integrated into master, 22 and 21 branches for testing.

            Show
            nebgor Aparup Banerjee added a comment - ok this has now been integrated into master, 22 and 21 branches for testing.
            Hide
            andyjdavis Andrew Davis added a comment -

            Works as described.

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

            It is late here and I'm very tired but I didn't want to go to sleep before expressing my admiration for your amazing collaboration. Thanks!

            Closing as fixed, heading to zzzZZZzzz, niao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - It is late here and I'm very tired but I didn't want to go to sleep before expressing my admiration for your amazing collaboration. Thanks! Closing as fixed, heading to zzzZZZzzz, niao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12