Plugin Directory

Changeset 3009379


Ignore:
Timestamp:
12/13/2023 11:39:20 AM (2 years ago)
Author:
minicrmio
Message:

[Bugfix] Limit exported product description length to 1024 to make sure it can be imported by MiniCRM

Location:
minicrm-woocommerce-sync/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • minicrm-woocommerce-sync/trunk/languages/minicrm-woocommerce-sync.pot

    r2988079 r3009379  
    44"Project-Id-Version: MiniCRM "
    55"WooCommerce Sync plugin "
    6 "v1.5.26\n"
     6"v1.5.27\n"
    77"POT-Creation-Date: 2022-05-30 "
    88"22:22+0200\n"
  • minicrm-woocommerce-sync/trunk/lib/Feed.php

    r2988079 r3009379  
    516516                            throw new \Exception ("Unexpected item class: '$itemClass'");
    517517                    }
     518                    // Apply htmlspecialchars and then safely truncate to 1024 characters
     519                    $encodedDescription = htmlspecialchars($productDescription, ENT_QUOTES, 'UTF-8');
     520                    $safeTruncatedDescription = mb_substr($encodedDescription, 0, 1024, 'UTF-8');
    518521
    519522                    // Add XML node
     
    527530                    $product->Quantity = $item->get_quantity ();
    528531                    $product->SKU = $sku;
    529                     $product->Description = htmlspecialchars($productDescription); //  ensure that special characters in the product description don't interfere with the XML structure.
     532                    $product->Description = $safeTruncatedDescription;
    530533                    $product->Unit = $localUnit;
    531534                    $product->VAT = "$taxPercent%";
  • minicrm-woocommerce-sync/trunk/minicrm-woocommerce-sync.php

    r2988079 r3009379  
    1010 * Requires PHP: 8.0
    1111 * Text Domain: minicrm-woocommerce-sync
    12  * Version: 1.5.26
     12 * Version: 1.5.27
    1313 * WC requires at least: 4.0.0
    1414 * WC tested up to: 7.2
  • minicrm-woocommerce-sync/trunk/readme.txt

    r2988079 r3009379  
    55Requires at least: 4.9
    66Requires PHP: 8.0
    7 Stable tag: 1.5.26
     7Stable tag: 1.5.27
    88Tested up to: 6.2
    99WC requires at least: 4.0.0
Note: See TracChangeset for help on using the changeset viewer.