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

    In french, we have a lot of é, è, à ... those characters are turned into é, è and so on when published.

    But, when someone makes a search into the content of the site, with AjaxSearch for ex, thoses entities prevent the search to output good results.

    So, my question is : Is there a way to not transform characters with accents ?

    I tried to changed the list inside assets\plugins\tinymce\jscripts\tiny_mce\themes\advanced\jscripts\charmap.js but it didn’t change anything...

    Thanks for any help smiley
      • 7923
      • 4,213 Posts
      you could use this http://tinymce.moxiecode.com/tinymce/docs/option_entities.html to set what you want to be converted to htmlentities

      edit: altough, a better way would be to modify the seach snippet and do htmlentities() php call on the search string, so that it will be turned into html entities too..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 23050
        • 1,842 Posts
        Hi Doze

        Quote from: doze at Nov 23, 2006, 04:56 PM

        you could use this http://tinymce.moxiecode.com/tinymce/docs/option_entities.html to set what you want to be converted to htmlentities

        Ah yeah... I did it yesterday but I just tried to replace eacu with é... Today, I realize that I had to remove "233,eacute," wink
        It’s ok now !

        Quote from: doze at Nov 23, 2006, 04:56 PM

        edit: altough, a better way would be to modify the seach snippet and do htmlentities() php call on the search string, so that it will be turned into html entities too..

        I did try this too in AjaxSearch :
        $searchString = htmlentities($searchString, ENT_QUOTES, 'UTF-8');


        But, as the introtext not uses TinyMCE, the é weren’t changed into eacute; and so, search couldn’t find the words in introtext.
        The solution would be to build 2 search string : one with html entities and the other, without.

        Finally, I keep the solution with TinyMCE : better output in search results when results has to cut a eacute; for example and only outputs eac, same in Ditto for truncating... Well, hope my opinion is clear ! grin

        Thank you for your help
          • 4018
          • 1,131 Posts
          I added support for setting the entities in TinyMCE...not sure if it’s in the 2.0.6.1b version...but the 2.0.8 version definitely does. I’ll post it to the repository today. Should be stable enough for everyday use. smiley
            Jeff Whitfield

            "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
            • 23050
            • 1,842 Posts
            Hi Jeff,

            Do you mean that we will be able to choose whether or not use html entities ?
              • 23050
              • 1,842 Posts
              Jeff, I’ve just managed to avoid TinyMCE to transform characters by selecting "raw" in "Entity Encoding", in TinyMCE Configuration tab.

              It’s cool feature ! As you didn’t talk about it on your post here, I thought this config wasn’t important lol...

              Well... A big thank you for this lovely feature wink
                • 28760
                • 7 Posts
                i’m finding trouble with the Raw option, in entities. It still turns & into & and it wrecks some of the code (right now is messing with an eForm snippet call).

                It works correctly if I write it in HTML, but as soon as I enter again in the page, it gets turned to entities again, so if I want to do some change... well, it fails.

                Thing is: I don’t want it to fail. I know how to repair it, it’s quite easy (it’s a pain in the ass, tho), but the client I’m doing the website for won’t know.
                  • 26931
                  • 2,314 Posts
                  i’m finding trouble with the Raw option, in entities. It still turns & into & and it wrecks some of the code (right now is messing with an eForm snippet call).
                  It works correctly if I write it in HTML, but as soon as I enter again in the page, it gets turned to entities again, so if I want to do some change... well, it fails.
                  Thing is: I don’t want it to fail. I know how to repair it, it’s quite easy (it’s a pain in the ass, tho), but the client I’m doing the website for won’t know.
                  ...snippet calls actually shouldn’t be placed in a wysiwyg field, but if you really want to, you could try to place the snippet call in a chunk ... and the chunk in your content field. or just uncheck the option "Rich Text" for this page.