qtranslate / qtranslate-xt

qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
554 stars 105 forks source link

Escape `_` in SQL LIKE queries for Slugs import #1217

Closed herrvigg closed 2 years ago

herrvigg commented 2 years ago

The previous code worked but _ is a wildcard for any character in SQL LIKE. Escape it to make the query more reliable in case the prefix values are changed (for developers). Ignore other wildcards.

herrvigg commented 2 years ago

Not directly related to #1206 but used in the same context.