Thread: HTML Entities

Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2006
    Location
    Rosebud, Victoria, Australia
    Posts
    310
    Plugin Contributions
    2

    Default HTML Entities

    G'day,

    Trying to handle HTML entities properly is quite problematic.

    Take a product name like Light & Motion Sola 1/2" Lockline Arm. If it's entered into Zen Cart like that the result is a heap of page HTML Validation errors.

    If the & and " are entered as HTML entities the HTML validation errors go away.

    But people then search for Light & Motion or 1/2" within Zen Cart and they are not found. To be found they would have had to replace & or " with the right HTML entity used by the person doing the data entry. And given that there can be a few different valid HTML entities used to generate & or ", that's unlikely to happen.

    This applies equally to other fields like product description, product model and manufacturer name values.

    So a better solution would be for Zen Cart to recognise that there could be characters that need to be turned into HTML entities in the various values, and then output theses values as HTML entities.

    Then this major disconnect between usability and solving validation issues could be solved.

    Any chance this could be done sometime soon?

    Or am I missing something and there is a way to overcome this problem already? Because right now the solution eludes me.

    Best regards, Lloyd Borrett.
    Zen Cart 1.5.5e, PHP 5.3.29 MySQL 5.5.42

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: HTML Entities and Zen Cart

    Did this discussion start as a result of search-related questions?
    .

    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.

  3. #3
    Join Date
    Mar 2006
    Location
    Rosebud, Victoria, Australia
    Posts
    310
    Plugin Contributions
    2

    Default Re: HTML Entities and Zen Cart

    G'day,

    Nope. It started because I started to try and enter HTML entities to fix HTML validation issues, but then found doing so broke searching.

    Best regards, Lloyd Borrett.
    Zen Cart 1.5.5e, PHP 5.3.29 MySQL 5.5.42

  4. #4
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: HTML Entities and Zen Cart

    I found the biggest issue to this was in category names, and the other issue was when there are either 2 " or ' in a product title, it broke the title and caused problems with Google and product feeds.

    Zen Cart and it's community are the best!!

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: HTML Entities and Zen Cart

    It's a bit of a chicken/egg thing:

    Customers will never search using raw html: a normal customer will enter plain characters, or copy-paste from another site, etc, thus using already-converted symbols.

    So, if storeowners were always forced to use already-converted entities, everything would be simple.

    But, storeowners assert that they want to be able to enter raw HTML into product names, descriptions, category names, everything. When we took that away in an earlier version (to address this concern you're raising) it resulted in a chaotic backlash, and lots of confusion.

    As you already know, there's another discussion on this very topic, which you've already posted in: https://www.zen-cart.com/showthread....ated&p=1282380



    BTW, Lloyd, it's great to see you around these parts again!
    .

    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.

  6. #6
    Join Date
    Mar 2006
    Location
    Rosebud, Victoria, Australia
    Posts
    310
    Plugin Contributions
    2

    Default Re: HTML Entities and Zen Cart

    G'day,

    If storeowners are forced to use HTML entities then store search breaks. Plus it would be a huge task on some sites to update to conform. So I can understand the backlash.

    I think Zen Cart should assume there is raw HTML in fields. Indeed, storeowners should be encouraged to enter raw HTML so that search can work.

    Zen Cart should then deal with the output accordingly to make sure all output has correctly handled HTML entities. The only problem is having Zen Cart making sure the content isn't messed up if both raw and correct HTML is present.

    BTW, Lloyd, it's great to see you around these parts again!
    Thanks. Nearly two years ago I purchased the dive shop business I setup the Zen Cart store for back in 2006 - see https://www.scubadoctor.com.au/diveshop/
    lat9 has helped me to update the store to Zen Cart 1.5.4 from 1.3.6, plus install a heap of plugins to improve things. It's a partnership that is working great. I have just enough knowledge about Zen Cart to be dangerous. I seem to find heaps of problems, or come up with ideas as to how I think something can be done better, and lat9 has the detailed Zen Cart knowledge and coding skills to make it happen. We've made huge improvements to the store since migrating to 1.5.4 just after Easter, but we still have a long list of things to do.

    Best regards, Lloyd Borrett.
    Last edited by lloyd_borrett; 18 May 2015 at 11:35 PM.
    Zen Cart 1.5.5e, PHP 5.3.29 MySQL 5.5.42

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

    Default Re: HTML Entities and Zen Cart

    Quote Originally Posted by lloyd_borrett View Post
    The only problem is having Zen Cart making sure the content isn't messed up if both raw and correct HTML is present.
    Agreed. And therein lies the rub. That's the specific challenge, since there are security implications of doing it incorrectly.
    .

    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.

 

 

Similar Threads

  1. v155 v1.5.5a Configuration Edit Update HTML Entities
    By rbarbour in forum Bug Reports
    Replies: 8
    Last Post: 5 Sep 2019, 07:55 PM
  2. HTML entities in TinyMCE
    By ryska in forum General Questions
    Replies: 1
    Last Post: 22 Sep 2008, 03:53 PM

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