Moodle
  1. Moodle
  2. MDL-28101

Bold and italics do not work with the NWIKI formatting

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      17722

      Description

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

        Issue Links

          Activity

          Hide
          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
          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
          Charles Fulton added a comment -

          Updating with patches against all versions of 2.

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

          Thanks for spot-on Patch Charels.

          Show
          Rajesh Taneja added a comment - Thanks for spot-on Patch Charels.
          Hide
          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 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
          Rajesh Taneja added a comment -

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

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

          Hi Rajesh,
          Looks good now.
          Thanks

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

          Thanks Ankit

          Show
          Rajesh Taneja added a comment - Thanks Ankit
          Hide
          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
          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
          Rajesh Taneja added a comment -

          Hello Aparup,

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

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

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

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

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

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

          Works as described.

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