Title: FILTER_SANITIZE_STRING deprecated
Last modified: January 8, 2026

---

# FILTER_SANITIZE_STRING deprecated

 *  [swissspaceboy](https://wordpress.org/support/users/swissspaceboy/)
 * (@swissspaceboy)
 * [5 months ago](https://wordpress.org/support/topic/filter_sanitize_string-deprecated-3/)
 * **Issue:** Bundled library `voku/portable-utf8` uses deprecated `FILTER_SANITIZE_STRING`
 * **File:** `assets/simple-html-dom/voku/portable-utf8/src/voku/helper/UTF8.php`
 * **Location 1 – Line 1797:**
 *     ```wp-block-code
       public static function file_get_contents(
           string $filename,
           // ... parameters ...
       ) {
           // init
           $filename = \filter_var($filename, \FILTER_SANITIZE_STRING);  // LINE 1797
           // ...
       }
       ```
   
 * **Location 2 – Lines 1951 & 2007:** These are in code comments/examples showing
   usage of `FILTER_SANITIZE_STRING`
 * **Issue:** `FILTER_SANITIZE_STRING` is deprecated in PHP 8.1 and removed in PHP
   8.2+
 * **Note:** The actual bug is in the bundled library `voku/portable-utf8`. The 
   CF7 Grid Layout author should:
    1. Update the bundled `portable-utf8` library to the latest version (already fixed
       upstream), OR
    2. Apply a patch to replace `FILTER_SANITIZE_STRING` with `FILTER_SANITIZE_FULL_SPECIAL_CHARS`
 * Thanks,
 * Didier.

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffilter_sanitize_string-deprecated-3%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/cf7-grid-layout/assets/icon-256x256.png?rev=1834229)
 * [Smart Grid-Layout Design for Contact Form 7](https://wordpress.org/plugins/cf7-grid-layout/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-grid-layout/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-grid-layout/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-grid-layout/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-grid-layout/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-grid-layout/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [swissspaceboy](https://wordpress.org/support/users/swissspaceboy/)
 * Last activity: [5 months ago](https://wordpress.org/support/topic/filter_sanitize_string-deprecated-3/)
 * Status: not resolved