Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor 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').
      1. test.php
        1 kB
        Aleksey Avdeev

        Issue Links

          Activity

          Aleksey Avdeev created issue -
          Aleksey Avdeev made changes -
          Field Original Value New Value
          Description The filter must:
          # Delete all zero-width space characters ('\xe2\x80\x8b').
          # Replace characters form-feed ('\f') for newline ('\n').
          # Delete characters carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v').
          # Remove white space ('\s+$') at the end.
          # Remove whitespace ('^\s+') at the beginning of the line.
          # Replace the string consisting of whitespace characters ('\n[ \r\t\v]+\n') to empty ('\n\n').
          The filter must:
          # Delete all zero-width space characters ('\xe2\x80\x8b').
          # Replace characters form-feed ('\f') for newline ('\n').
          # Delete characters carriage return ('\r').
          # Replace characters horizontal tab ('\t'), and vertical tab ('\v') for space (' ').
          # Remove white space ('\s+$') at the end.
          # Remove whitespace ('^\s+') at the beginning of the line.
          # Replace the string consisting of whitespace characters ('\n[ \r\t\v]+\n') to empty ('\n\n').
          Hide
          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
          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';
          Aleksey Avdeev made changes -
          Labels patch
          Hide
          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
          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() .
          Aleksey Avdeev made changes -
          Pull Master Diff URL http://git.altlinux.org/people/solo/public/?p=moodle-local_amos.git;a=commitdiff;h=0c21576bd66c56a9aad603d79da2bf9ca809de4c
          Pull Master Branch MDLSITE/1510
          Description The filter must:
          # Delete all zero-width space characters ('\xe2\x80\x8b').
          # Replace characters form-feed ('\f') for newline ('\n').
          # Delete characters carriage return ('\r').
          # Replace characters horizontal tab ('\t'), and vertical tab ('\v') for space (' ').
          # Remove white space ('\s+$') at the end.
          # Remove whitespace ('^\s+') at the beginning of the line.
          # Replace the string consisting of whitespace characters ('\n[ \r\t\v]+\n') to empty ('\n\n').
          The filter must:
          # Delete all zero-width space characters ('{{\xe2\x80\x8b}}').
          # Replace characters form-feed ('{{\f}}') and vertical tab ('{{\v}}') for newline ('{{\n}}').
          # Delete characters carriage return ('{{\r}}').
          # Replace characters horizontal tab ('{{\t}}') for space (' ').
          # Remove white space ('{{\s+$}}') at the end.
          # Remove whitespace ('{{^\s+}}') at the beginning of the line.
          # Replace the string consisting of whitespace characters ('{{\n[ \r\t\v]+\n}}') to empty ('{{\n\n}}').
          Aleksey Avdeev made changes -
          Link This issue is blocked by MDLSITE-1563 [ MDLSITE-1563 ]
          Aleksey Avdeev made changes -
          Link This issue is blocked by MDLSITE-1565 [ MDLSITE-1565 ]
          Hide
          David Mudrak added a comment -

          Closing as deprecated by the reporter.

          Show
          David Mudrak added a comment - Closing as deprecated by the reporter.
          David Mudrak made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Won't Fix [ 2 ]
          Martin Dougiamas made changes -
          Workflow jira [ 100193 ] SITES Full Workflow [ 127370 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development