We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40029
    • 52 Posts
    Hi,

    ver: Revo 2.2.>

    cultureKey: it

    tested on other version of php does not generate error,

    but the error exist in the file.

    In version 5.3.14 the execution flow is interrupted

    file: /core/components/formit/lexicon/it/recaptcha.inc.php


    old content:

    $_lang['recaptcha.empty_answer'] = 'Parole della validazione non valide. Si prega di controllare la vostra risposta e riprovare.';
    $_lang['recaptcha.incorrect'] = 'La validazione non è stata immessa correttamente. Tornare indietro e riprovare. [[+error]]';
    $_lang['recaptcha.mailhide_no_mcrypt'] = 'Per utilizzare la validazione reCAPTCHA Mailhide, dovete avere il modulo PHP mcrypt installato.';
    $_lang['recaptcha.mailhide_no_api_key'] = 'Per utilizzare la validazione reCAPTCHA Mailhide, dovete iscrivervi per le chiavi pubbliche e private, potete farlo all''indirizzo <a href="http://www.google.com/recaptcha/mailhide/">http://www.google.com/recaptcha/mailhide/</a>';
    $_lang['recaptcha.no_api_key'] = 'Per utilizzare la validazione reCAPTCHA dovete creare una chiave API da <a href="https://www.google.com/recaptcha/admin/create">https://www.google.com/recaptcha/admin/create</a>';
    $_lang['recaptcha.no_remote_ip'] = 'Per una questione di sicurezza, dovete si deve passare l''IP remoto a reCAPTCHA';
    



    new content:

    $_lang['recaptcha.empty_answer'] = 'Parole della validazione non valide. Si prega di controllare la vostra risposta e riprovare.';
    $_lang['recaptcha.incorrect'] = 'La validazione non è stata immessa correttamente. Tornare indietro e riprovare. [[+error]]';
    $_lang['recaptcha.mailhide_no_mcrypt'] = 'Per utilizzare la validazione reCAPTCHA Mailhide, dovete avere il modulo PHP mcrypt installato.';
    $_lang['recaptcha.mailhide_no_api_key'] = 'Per utilizzare la validazione reCAPTCHA Mailhide, dovete iscrivervi per le chiavi pubbliche e private, potete farlo all\'indirizzo <a href="http://www.google.com/recaptcha/mailhide/">http://www.google.com/recaptcha/mailhide/</a>';
    $_lang['recaptcha.no_api_key'] = 'Per utilizzare la validazione reCAPTCHA dovete creare una chiave API da <a href="https://www.google.com/recaptcha/admin/create">https://www.google.com/recaptcha/admin/create</a>';
    $_lang['recaptcha.no_remote_ip'] = 'Per una questione di sicurezza, dovete si deve passare l\'IP remoto a reCAPTCHA';
    
    



    Regards.
      Developer of RTOS and Drivers
      Specializes in portability of BSD/Linux
      • 3749
      • 24,544 Posts
      Your version is going to show the backslash in the error message. I think this would be the solution (using double quotes) any time you want to show a single or double quote inside a language string:


      $_lang['recaptcha.no_remote_ip'] = "Per una questione di sicurezza, dovete si deve passare l\'IP remoto a reCAPTCHA";



      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 40029
        • 52 Posts
        Hi Bob,

        That's right! but in the forum when you write some argument within [ code] is transformed to make it printable smiley

        $dummytext = 'l\'i'; // and this is valid 100% (so I do not understand very well what is your intervention)


        all solutions are valid concatenation, simple or complex, fast or slow.

        But since I am primarily a programmer ASM and C, continued my fight individual, at any
        project: web, desktop, mpu, demoscene, ect, ect
        the use of "ASSERT" model control code to avoid silly mistakes jeopardize the stability of an interoperable system.

        We could spend hours arguing about this, and I still think that a code without "assert" can be full of bugs

        I hope if my signs are taken as useful, not annoying for you.

        Regards.
          Developer of RTOS and Drivers
          Specializes in portability of BSD/Linux
          • 3749
          • 24,544 Posts
          No, I'm not annoyed at all, and your code is correct (and mine is wrong). I was referring to the general principle in PHP that escaped characters are interpreted in double quotes but not in single quotes.

          I was forgetting the exception that escaped single quotes are interpreted inside single quotes and escaped double quotes are interpreted inside double quotes (and not vice versa).

          So this code:

          echo '1 - Hello\t\t\t Goodbye\n';
          echo "\n";
          echo "2 - Hello'\t\t\t Goodbye";
          echo "\n";
          echo "3 - Hello\'Goodbye";
          echo "\n";
          echo '4 - Hello\'Goodbye';
          echo "\n";
          echo "5 - Hello\"Goodbye";
          


          Gives this result:

          1 - Hello\t\t\t Goodbye\n
          2 - Hello'			 Goodbye
          3 - Hello\'Goodbye
          4 - Hello'Goodbye
          5 - Hello"Goodbye



          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 40029
            • 52 Posts
            ahh ok ok, I was banging my head against the wall, looking for that was that was wrong and my code, and I'm back to grab my dictionary of English, to see if he understood his message better.

            Do not worry to forget, that happens to everyone, especially with languages ​​like PHP, which has dozens of rules aimed at treating the text.
            PHP is written in C and all escape sequences are evaluated directly and indirectly with the basic functions of C for the treatment of text (* print *, mem *, etc.) and there is no translation by the function "zend_yytnamerr" of zend core, which in turn if you filter all the cases described.

            small note, this is not the same for mysql, also her escape sequences are interpreted with native C functions, but I remember above are filtered by the function "p_simp_re"

            Regards. [ed. note: rtoskit last edited this post 14 years, 3 months ago.]
              Developer of RTOS and Drivers
              Specializes in portability of BSD/Linux
              • 3749
              • 24,544 Posts
              It's been quite a while since I worked in C, but I don't remember that escaping exception. Maybe I just never ran into it.


              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting