HUSKY - Product Filter for WooCommerce

woof_text_urlencode

Controls whether filter values in the URL query string should be URL-encoded, enabling special character handling in search parameters.

Parameters

$encode (int) — Integer flag (0 or 1) — 0 means no encoding, 1 means filter values will be urlencode()'d

Source File

index.php:2053

Code Example

add_filter('woof_text_urlencode', function($encode) {
    // Enable URL encoding for special characters
    return 1;
});

Usage Notes

  • Located in the get_request_data() method which sanitizes and processes $_GET parameters.
  • When enabled, filter values are passed through urlencode() after trimming slashes.
  • The 'woof_text' key specifically has '+' characters replaced with spaces for security.