Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,015
    Plugin Contributions
    61

    Default [Not a bug] class.html2text.php

    Zen 1.5.4

    Code:
        public $callback_search = array(
            '/<(a) [^>]*href=("|\')([^"\']+)\2([^>]*)>(.*?)<\/a>/i', // <a href="">
            '/<(h)[123456]( [^>]*)?>(.*?)<\/h[123456]>/i',         // h1 - h6
            '/<(b)( [^>]*)?>(.*?)<\/b>/i',                         // <b>
            '/<(strong)( [^>]*)?>(.*?)<\/strong>/i',               // <strong>
            '/<(th)( [^>]*)?>(.*?)<\/th>/i',                       // <th> and </th>
        );
    shouldn't it be

    Code:
        public $callback_search = array(
            '/<(a) [^>]*href=("|\')([^"\']+)\2([^>]*)>(.*?)<\/a>/i', // <a href="">
            '/<(h)[123456]( [^>]*)(.*?)<\/h[123456]>/i',         // h1 - h6
            '/<(b)( [^>]*)(.*?)<\/b>/i',                         // <b>
            '/<(strong)( [^>]*)(.*?)<\/strong>/i',               // <strong>
            '/<(th)( [^>]*)(.*?)<\/th>/i',                       // <th> and </th>
        );
    Bunch of validation issues as well with regard to the script tags and their location. I suspect that the script tag location problem for jquery is because the head/html are not correctly closed

    But the tags all have no type in any case.

    ~Melanie
    Last edited by mprough; 2 Jan 2015 at 05:33 PM. Reason: version
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

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

    Default Re: class.html2text.php

    That comes directly from PHPMailer. https://github.com/PHPMailer/PHPMailer/releases

    ZC v1.5.4 includes the files from PHPMailer v5.2.6.
    Haven't done regression testing for PHPMailer v5.2.9 onto Zen Cart v1.5.4 to ensure there aren't any issues with it.

    In the meantime you might want to try that version to see if it sorts out your validation issues.
    .

    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
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,015
    Plugin Contributions
    61

    Default Re: class.html2text.php

    Quote Originally Posted by DrByte View Post
    That comes directly from PHPMailer. https://github.com/PHPMailer/PHPMailer/releases

    ZC v1.5.4 includes the files from PHPMailer v5.2.6.
    Haven't done regression testing for PHPMailer v5.2.9 onto Zen Cart v1.5.4 to ensure there aren't any issues with it.

    In the meantime you might want to try that version to see if it sorts out your validation issues.
    The syntax is broken in all of the versions including 5.2.8 & 5.2.9

    /**
    * List of preg* regular expression patterns to search for
    * and replace using callback function.
    *
    * @type array
    */
    protected $callback_search = array(
    '/<(a) [^>]*href=("|\')([^"\']+)\2([^>]*)>(.*?)<\/a>/i', // <a href="">
    '/<(h)[123456]( [^>]*)?>(.*?)<\/h[123456]>/i', // h1 - h6
    '/<(b)( [^>]*)?>(.*?)<\/b>/i', // <b>
    '/<(strong)( [^>]*)?>(.*?)<\/strong>/i', // <strong>
    '/<(th)( [^>]*)?>(.*?)<\/th>/i', // <th> and </th>
    );
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  4. #4
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,015
    Plugin Contributions
    61

    Default Re: class.html2text.php

    Should be

    Code:
        protected $callback_search = array(
            '/<(a) [^>]*href=("|\')([^"\']+)\2([^>]*)>(.*?)<\/a>/i', // <a href="">
            '/<(h)[123456]( [^>]*)>(.*?)<\/h[123456]>/i',           // h1 - h6
            '/<(b)( [^>]*)>(.*?)<\/b>/i',                           // <b>
            '/<(strong)( [^>]*)>(.*?)<\/strong>/i',                 // <strong>
            '/<(th)( [^>]*)>(.*?)<\/th>/i',                         // <th> and </th>
        );
    I think
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

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

    Default Re: class.html2text.php

    The ? symbol means "previous character may occur 0 or more times" ... which seems reasonable as it allows for attributes to be included in those tags. I would think removing it is likely to cause misinterpretation, wouldn't it?

    By the way, what jQuery issues are you talking about? This class is used for email translation. How are you connecting jQuery to email contents?
    .

    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
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,015
    Plugin Contributions
    61

    Default Re: class.html2text.php

    Well, this came up as i was looking for errors.... the syntax is broken, which in turn breaks everything in the file from line 173 down.

    By the way, what jQuery issues are you talking about? This class is used for email translation. How are you connecting jQuery to email contents?
    Because you said
    That comes directly from PHPMailer. https://github.com/PHPMailer/PHPMailer/releases

    ZC v1.5.4 includes the files from PHPMailer v5.2.6.
    Haven't done regression testing for PHPMailer v5.2.9 onto Zen Cart v1.5.4 to ensure there aren't any issues with it.

    In the meantime you might want to try that version to see if it sorts out your validation issues.


    Validation Output: 10 Errors

    Vanilla 1.5.4 (http://validator.w3.org/check?uri=ht...org%2Fservices)
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

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

    Default Re: class.html2text.php

    Notwithstanding your W3C validation comment (entirely separate issue IMO), I still don't understand the connection between jQuery and class.html2text.php
    .

    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.

  8. #8
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,015
    Plugin Contributions
    61

    Default Re: class.html2text.php

    I was simply posting both errors, that and the validation issues. You suggested

    In the meantime you might want to try that version to see if it sorts out your validation issues.
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

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

    Default Re: class.html2text.php

    Ok, thanks for clarifying that we were talking about 2 different things.

    Now, how did you come upon discovering an issue with class.html2txt.php ? Were you triggering a specific kind of email that converted HTML to text incorrectly?
    I'm trying to understand a use-case so the problem can be fixed properly, even if that means posting a bug report to the phpmailer project.
    .

    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
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,015
    Plugin Contributions
    61

    Default Re: class.html2text.php

    No I was scanning the files over for errors and it popped up
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 tax related bug in order.php class
    By j_vovus in forum Bug Reports
    Replies: 0
    Last Post: 9 Apr 2012, 11:34 AM
  2. Replies: 0
    Last Post: 22 Jun 2010, 12:20 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