Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default [Done v1.5.0] Is it the editor, ZC or browsers?

    I normally prepare my page contents and product descriptions with the help of FrontPage or Notepad++ and insert the HTML code in Zen Cart after changing the FrontPage's nasty <br> to <br />, all & characters to &amp; and all instances of € to &euro; in order for the code to pass the W3C validator.

    I have tried both the Plain Text and the HTMLarea editors (the latter in code mode) and that works fine until the page is saved. If I re-open the page in the editor, all &amp; have been converted to &, all &euro; to € and so on. This means that, even if I want to change a single character, I have to copy the code, paste it in Notepad++, do what change is required and then Find & Replace all special characters again.

    I have tried with the latest versions of Google Chrome and Firefox but there's no difference between the two.

    Any ideas why this is happening and if, installing another editor (suggestions welcome), would change things?

  2. #2
    Join Date
    Mar 2008
    Location
    Ontario
    Posts
    39
    Plugin Contributions
    0

    Default Re: Is it the editor, ZC or browsers?

    It is complicated and hard to keep straight. You may have noticed these encoding errors can be seen all over the net.

    The cut and paste facility of the os (operating system) converts the text on the Cut and Paste.

    The short answer:

    You want to type &euro; and paste &euro;

    If your editor has a preview, you can view it there.
    Jonny
    http://meshgraphics.com Where shapes become different shapes than the shapes they had been previously. Me do good ad copy 2

  3. #3
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: Is it the editor, ZC or browsers?

    Hi Jonny and thanks for your reply.

    I may have not described the issue correctly: I do use &euro; instead of € and &amp; instead of & when preparing the text in my editor, I copy and paste the HTML code in the Define Pages Editor and it is accepted correctly with the special characters rendered correctly in the browsers and the page validating with W3C.

    The problem is when I re-open the editor and all the above coding is gone and replaced with € and &. If I save at that point (changes made or not), the page obviously doesn't validate because of the € and & characters.

  4. #4
    Join Date
    Mar 2008
    Location
    Ontario
    Posts
    39
    Plugin Contributions
    0

    Default Re: Is it the editor, ZC or browsers?

    Are you talking about editing a product description in the Admin?
    Jonny
    http://meshgraphics.com Where shapes become different shapes than the shapes they had been previously. Me do good ad copy 2

  5. #5
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: Is it the editor, ZC or browsers?

    I'm talking of both the product description and define pages editors. To take a fictitious entry:

    Enter the following in the editor and save:

    Code:
    This product costs &euro;1,000 and you can see it at
    http://www.athenscollectibles.info/index.php?main_page=product_info&amp;cPath=5_27&amp;products_id=1
    This will render in the browsers as:
    Code:
    This product costs €1,000 and you can see it at
    http://www.athenscollectibles.info/index.php?main_page=product_info&cPath=5_27&products_id=1
    Run through the W3C validator. The page validates!

    Go back and open the page in the editor. The previously entered first code (with &euro; and &amp;) is now changed to € and &. If you save at this point, the page doesn't validate because the editor has saved the € and & characters.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Is it the editor, ZC or browsers?

    What version of Zen Cart?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: Is it the editor, ZC or browsers?

    Hi Doc! It's 1.3.9h (started with 1.3.9d and upgraded as each new version was released).

  8. #8
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: Is it the editor, ZC or browsers?

    Sorry to bring this up again, but can I please have an answer if this is something that can be corrected or should I despair and accept it as the editor's "nasty peculiarity". Many thanks for any reply.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Is it the editor, ZC or browsers?

    That was a problem that existed in v1.3.8 and maybe early editions of v1.3.9.

    But I just tested it in a clean install of v1.3.9h and the problem does NOT manifest there when using Plain Text mode.

    Maybe you have old addons or outdated files that didn't properly get upgraded from the older versions.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: Is it the editor, ZC or browsers?

    Thanks for the reply. I found an amended (by me) in the past file: includes/functions/functions_general.php which I now replaced with the one from a clean install. This corrected half of the problem: the &amp; and &euro; do not change in the product description editor, but they still turn to & and € in the define pages editor.

    Have you tested in both or do you have any ideas as to which other file could be causing this?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 7
    Last Post: 23 Feb 2010, 01:21 AM
  2. [Done v2.0] Junk code generated in HTML editor area
    By jamieboulder in forum Bug Reports
    Replies: 2
    Last Post: 10 Mar 2008, 06:31 PM
  3. hyperlink button in editor breaks the editor
    By spookyghost in forum General Questions
    Replies: 2
    Last Post: 11 Jun 2007, 05:46 PM
  4. Replies: 2
    Last Post: 6 Sep 2006, 06:13 AM
  5. [DONE] Review Editor Too small
    By qhome in forum Bug Reports
    Replies: 4
    Last Post: 2 Jun 2006, 02:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR