We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16732
    • 592 Posts
    Hi,
    I’m using MODx 0.9.2.1 (rev 1005) and I have the folowing problem :

    when I use an accentuated character ( é à è) for french texts, in a string for a snippet parameter the final value stop before the first accentuated character .

    exemple : &param=`blé à blé` => result "b" shocked

    I make a mini snippet ’testcar’ with just "return $param;" for testing :

    Snippet testcar
    return $param;
    


    And use the code to see the result :

    [[testcar? &param=`blé à blé` ]]
    


    the résult is : "b"

    Some one know why ?

    Thank’s for your help
      • 33175
      • 711 Posts
      You can try to use htm entities.
      If for some reasons, you can’t use them, I think the best is to add a new bug in the bugtracker.
        Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
        • 16732
        • 592 Posts
        Hi Guillaume,
        Using htm entities was my first reaction, but I have the same result with them sad
          • 5290
          • 29 Posts
          I have also bumped into this problem. It seems that when you use a special character in the value of a (snippet)parameter, it’ll be translated into an HTML-entity. For instance é will be translated into é. I assume it’s the opening ampersand that causes the problem. The MODx parser will interpret it as it being the indicator for a new parameter. I’ve tried escaping the ampersand with a backslash — hoping the snippet call would be treated as PHP-code — but this doesn’t work. It may not be a crucial flaw, but for International users and designers that like using correct typographical glyphs (I happen to be both) it is definitely annoying.
            A computer program is a utilitarian typographer's dream - a functioning machine composed completely of type. (John Maeda)
            • 29988
            • 89 Posts
            The html entities encoding are a two-sided wheapon, as discussed in other threads. Probably some additional setting for content treatment should be proposed in the TVs/content settings. Stay tuned.
              • 16732
              • 592 Posts
              @chunkyRice
              Yes it was also my conclusion ( see this topic on the french forum : http://modxcms.com/forums/index.php/topic,5569.0.html)
                • 22303 MODX Staff
                • 10,725 Posts
                The problem here is the rich-text editors; this issue is already being researched I believe.

                So, if you save a snippet tag using a rich-text editor in MODx (TinyMCE or FCKeditor), the actual content of the tag is translated to HTML entities, and then the result is in fact ’b’. However, if you place the same tag in a plain textarea (i.e. don’t use the rich-text editor), the tag stays in tact, and the result is returned with the proper characters.
                  • 5290
                  • 29 Posts
                  However, if you place the same tag in a plain textarea (i.e. don’t use the rich-text editor), the tag stays in tact, and the result is returned with the proper characters.
                  I’m afraid that isn’t so. I have my text edit boxes set to plain text by default. Even then, I’ve tried resolving the problem with the RTE both off and on and in both cases, the problem occurs.
                    A computer program is a utilitarian typographer's dream - a functioning machine composed completely of type. (John Maeda)
                    • 16732
                    • 592 Posts
                    I’m afraid that OpenGeek is right... I have put ’Using WYSIWYG Editor’ to None, than put an ’à’ in my parameter string .... and it’s working ... my ’à’ is visible now.... to bad for all the international MODx users who have a lot of special characters in there langage undecided
                      • 5290
                      • 29 Posts
                      I’ve tried to duplicate this. I made a page with Ditto 1.0.1 in a MODx install 0.9.2.1 and added some parameters, making sure not to use any RTE:
                      [[Ditto? &dateformat=`%d-%m-%Y — %H:%M` &truncText=`Lees verder &#O133;`]]

                      Unfortunately I don’t seem to have the same amount of luck. Both HTML entities break.
                      I’ve tried using different kinds of character encoding, as well as changing the Language setting to English, Dutch and French (Called, ironically enough, Francais instead of Français). I’ve also changed the Enable Editor setting in the System Configuration to ’no’ and the Editor to Use to ’none’, but nothing makes any difference. Eventually I swapped Ditto for NewsListing, but the result was the same.

                      No matter what I do: HTML entities break my parameters. Am I overlooking something?
                        A computer program is a utilitarian typographer's dream - a functioning machine composed completely of type. (John Maeda)