Announcement

Collapse
No announcement yet.

Rich Text Editor and HTML Entities

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Rich Text Editor and HTML Entities

    When using the Rich Text Editor we can't seem to easily insert reg or tm symbols. The get converted to the rendered symbol in the code, that then shows up as a that broken/diamond symbol. We can go into code edit and manually replace them all with ® etc but if you look at the code again they are converted and twiddle with the rich text editor again and you could end up with broken diamonds again. I'm not sure if it is some special encoding we need on the site, or is a problem with the editor.

    #2
    I don't seem to be running into this. Meaning, if I enter say © in source, its stays as the copyright symbol even after saving it through the RTE. (chrome only)
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Well that's bizarre. I tried Edge, Chrome and Firefox and same issue. I wonder if it can be my server - hosted by Miva? Does the charset matter for HTML entities?

      When I look at the page source within the admin of my store I see some Miva variables including


      "charset": ""

      and using view source on the public side I see charset is UTF-8

      I'm just reaching here...

      Comment


        #4
        Can you post the code causing the problem?
        Ray Yates
        "If I have seen further, it is by standing on the shoulders of giants."
        --- Sir Isaac Newton

        Comment


          #5
          Originally posted by habreu View Post
          Well that's bizarre. I tried Edge, Chrome and Firefox and same issue. I wonder if it can be my server - hosted by Miva? Does the charset matter for HTML entities?

          When I look at the page source within the admin of my store I see some Miva variables including


          "charset": ""

          and using view source on the public side I see charset is UTF-8

          I'm just reaching here...
          Are you entering source/html mode and typing in &copy; ? Cause that should be like typing <p></p>. And no, server or character set shouldn't matter.
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment


            #6
            Character Set in the store does matter, according to the test I just did. With my store outputting the "utf-8" character set (Edit Store > Store Details > Settings > Character Set), tm, reg, etc all work without issue pasting, typing, updating. If I remove the character set, It does strange things. If I entered the TM character while in utf-8 mode and switch out of utf-8, the characters are converted to something else (ie, from TM to garbled characters), if I enter the character as &trade;, it disappears (probably because whatever character set it is trying to use doesn't have a character for TM).

            The Rich Text Editor just uses the browser's rendering of HTML to edit and display the data. Ray and Bruce's suggestions to use the HTML entities will most likely not work in your case, because once you switch into the rich text mode the browser will (most likely, it did for me) convert that html entity into an actual character, which is why you're getting weird results with no character set defined.

            Assuming your database is set to utf-8, try setting your store's charset to utf-8 as well and see if that fixes the issue. Just be aware that your store and your db character sets should match (otherwise you'll most likely have character conversion issues), and do some spot checking once you change the character set to make sure the output of characters on products, categories, etc is what you expect. You're going from no character set to a character set, so there may (or may not) be some conversion that happens. Let me know how it goes/if you need more help. If that doesn't do the trick, we can dig a little deeper to see what's going on with your particular setup.
            Ryan Guisewite
            Lead UI Developer / Miva, Inc.
            www.miva.com

            Comment


              #7
              Thank you. I set it to utf-8 and did some quick spot checking and seems to be okay. I'm looking at my database and see utf8_general_ci under collation so guessing that is utf-8? I'll keep an eye out but for now seems good.

              Comment

              Working...
              X