Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,239
    Plugin Contributions
    1

    Default HTML code in Option Value

    ZC v1.5.6c

    I'm resurrecting a partially dormant site (from v1.5.5f) and bringing it up to ZC v1.5.6c.

    I use HTML code in products_options_values > products_options_values_name such as:

    Code:
    <a href="https://my_affiliate_link" rel="noindex,nofollow" target="_blank">Brand</a>
    Way back when, this worked well. Then in some version of ZC this failed and any subsequent edits made to this field in Admin caused the full code to be displayed on page (escaping quotes, slashes etc.) rather than the link text - I worked around this at the time by directly editing the the database.

    Now it's time to do it properly. I'm sure I've seen some reference to this somewhere - htmlspecialchars or something.

    Could someone point me to the code that causes the above HTML code not to 'work' in products_options_values_name
    Simon

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,239
    Plugin Contributions
    1

    Default Re: HTML code in Option Value

    Comparing includes/modules/attributes.php for ZC v1.5.6c and ZC v1.5.0 I see the addition of

    Code:
    ENT_COMPAT, CHARSET, TRUE
    in the former. Would it be a simple as removing these from my v1.5.6c site - implications?
    Simon

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

    Default Re: HTML code in Option Value

    Er, can you say "Admin sanitization"?

  4. #4
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,239
    Plugin Contributions
    1

    Default Re: HTML code in Option Value

    Thanks to you that was a lot easier than I had envisaged.

    TEMPORARILY Disabling Strict Sanitization

    I only edit product attributes on my local server so am happy to permanently disable sanitization (remembering not to copy said php file to live in future upgrades)
    Simon

 

 

Similar Threads

  1. Replies: 8
    Last Post: 5 May 2020, 11:44 AM
  2. Option Value Manger, how to code a <br />
    By haredo in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 7 Apr 2009, 05:04 PM
  3. HTML in Option Value
    By ivogue in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 3 Apr 2009, 02:25 AM
  4. 2nd option value need to be changed by 1st option value
    By userman in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 15 Jan 2008, 03:04 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