We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2214
    • 33 Posts
    We are having a problem where apostrophes are not showing up when using TinyMCE with newspublisher. We have tried changing text encoding to match the document, looked into mysql text encoding etc.

    The problem is with TinyMCE’s insistence on escaping apostrophes with ' It appears that when the modx core encounters ' it simply drops that string. We tried setting the encoding for TinyMCE to raw (as you can see in the source) but it insists on escaping ’s. What do I need to do to get modx to not drop ' from any text input?

    Interestingly enough, the modx install on OpenSourceCMS.com exhibits these same issues.
      • 5727
      • 160 Posts
      I’m having the same problem. This is a rather annoying issue as it is blocking my front-end manager development right now. Anyone got it working?
        Olivier Deland
        Montreal, Canada - Web Developer
        • 4018
        • 1,131 Posts
        Question is...do apostrophes and other special characters work when they are inserted into the content of a normal page? If so, then the NewsPublisher needs to be updated so that it pulls and displays data in the same manner. Probably needs an unescape function or the like. We’ll look into it. smiley

        Jeff
          Jeff Whitfield

          "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
          • 2214
          • 33 Posts
          Jeff: Yes, if you go into the Manager and edit a page that was created by NewsPublisher, and add the apostrophes back in, it works as expected. So this is probably a newspublisher bug of sorts.
            • 6084
            • 3 Posts
            I’m having the same problem with escaped apostrophes ( ' ) being dropped from POST variables. It is not related to NewsPublisher - it’s either all snippets or input in general. I have examples that isolate the problem:

            http://www.grunzke.com/30 has a form that posts to itself, and just prints the $_POST array. It resembles NewsPublisher, but is not. It’s a custom snippet with a single line of code: print_r($_POST);

            Now check http://www.grunzke.com/tinymce.php which is exactly the same code - the same form, the same single line of php to print out the array.

            The first page, which is in the modx environment, drops the ' strings. The second page, which is the same code, keeps the escaped apostrophes. Clearly the problem is either how modx passes POST data or executes snippets. Feel free to PM me (or even post a reply here) if you want a login to see for yourself.

            Note that it’s only escaped apostrophes that get dropped - the Page title and Long title fields function correctly, because they aren’t wrapped by TinyMCE, which insists on replacing ’ with '
              • 4018
              • 1,131 Posts
              Best guess is that the content isn’t being escaped properly when it hit the POST variable...needs to use something similar to the mysql_escape_string function. Then, when you print it out, use a stripslashes function to display the code properly. Doesn’t have anything to do with TinyMCE really..it has more to do with how the variables are instantiated.

                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                • 5727
                • 160 Posts
                Quote from: Bravado at Apr 11, 2007, 02:28 AM

                Best guess is that the content isn’t being escaped properly when it hit the POST variable...needs to use something similar to the mysql_escape_string function. Then, when you print it out, use a stripslashes function to display the code properly. Doesn’t have anything to do with TinyMCE really..it has more to do with how the variables are instantiated.



                Please stay on topic. wink
                  Olivier Deland
                  Montreal, Canada - Web Developer
                  • 2214
                  • 33 Posts
                  We switched to FCKEditor for newspublisher pages, and it works fine.

                  As an aside, we are kind of steering clients away from newspublisher, because it blows so bad. ModX needs to definitely address the blogging issue and make it easier and less hacky if this platform is every going to take off.
                  • Quote from: asagray at May 12, 2007, 09:38 AM

                    As an aside, we are kind of steering clients away from newspublisher, because it blows so bad. ModX needs to definitely address the blogging issue and make it easier and less hacky if this platform is every going to take off.

                    LOL ... Must. Resist... tongue
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 2214
                      • 33 Posts
                      Ryan, if I am wrong, unleash it. But from what we have seen, sophisticated blogging is one of the least-straightforward things to implement in modx. Am I wrong?