Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Component/s: lang.moodle.org
    • Labels:

      Description

      The filter must:

      1. Delete all zero-width space characters ('\xe2\x80\x8b').
      2. Replace characters form-feed ('\f') and vertical tab ('\v') for newline ('\n').
      3. Delete characters carriage return ('\r').
      4. Replace characters horizontal tab ('\t') for space (' ').
      5. Remove white space ('\s+$') at the end.
      6. Remove whitespace ('^\s+') at the beginning of the line.
      7. Replace the string consisting of whitespace characters ('\n[ \r\t\v]+\n') to empty ('\n\n').

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              solo Aleksey Avdeev added a comment -

              The filter I added in the mlanglib.php function mlang_text_clean($text) (see http://git.altlinux.org/people/solo/public/?p=moodle-local_amos.git;a=commitdiff;h=0c21576bd66c56a9aad603d79da2bf9ca809de4c). To test its operation can be used test.php (see attached file):

              $ php test.php
              $ diff -u {1,2}.txt 
              --- 1.txt       2011-09-19 18:54:08 +0000
              +++ 2.txt       2011-09-19 18:54:08 +0000
              @@ -1,19 +1,15 @@
              -'
              -   
              -
              -   START
              +'START
               TEST
               
              -     
              +
               -
               
               --
              -TTT​YYY
              +TTTYYY
               
              -ZZZ
                  AAA
              -DOS+
              +ZZZ
              +AAA
              +DOS+
               DOS-
              -TAB    TAB
              -END  
              -
              -';
              +TAB TAB
              +END';

              Show
              solo Aleksey Avdeev added a comment - The filter I added in the mlanglib.php function mlang_text_clean($text) (see http://git.altlinux.org/people/solo/public/?p=moodle-local_amos.git;a=commitdiff;h=0c21576bd66c56a9aad603d79da2bf9ca809de4c ). To test its operation can be used test.php (see attached file): $ php test.php $ diff -u {1,2}.txt --- 1.txt 2011-09-19 18:54:08 +0000 +++ 2.txt 2011-09-19 18:54:08 +0000 @@ -1,19 +1,15 @@ -' - - - START +'START TEST - + - -- -TTT​YYY +TTTYYY -ZZZ AAA -DOS+ +ZZZ +AAA +DOS+ DOS- -TAB TAB -END - -'; +TAB TAB +END';
              Hide
              solo Aleksey Avdeev added a comment -

              The filter I added in the mlanglib.php function mlang_text_clean($text) (see http://git.altlinux.org/people/solo/public/?p=moodle-local_amos.git;a=commitdiff;h=0c21576bd66c56a9aad603d79da2bf9ca809de4c).

              This variant deprecated and moved to the old/MDLSITE/1510 brunch. The new version will use the mlang_string::fix_syntax().

              Show
              solo Aleksey Avdeev added a comment - The filter I added in the mlanglib.php function mlang_text_clean($text) (see http://git.altlinux.org/people/solo/public/?p=moodle-local_amos.git;a=commitdiff;h=0c21576bd66c56a9aad603d79da2bf9ca809de4c ). This variant deprecated and moved to the old/MDLSITE/1510 brunch. The new version will use the mlang_string::fix_syntax() .
              Hide
              mudrd8mz David Mudrák added a comment -

              Closing as deprecated by the reporter.

              Show
              mudrd8mz David Mudrák added a comment - Closing as deprecated by the reporter.

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: