• Noche70

    (@noche70)


    My website is using this plugin with no issue until I got a location name that has an apostrophe. How can I pass the url parameter with the apostrophe? I have used %27 but it’s giving me an extra slash: https://screencast.com/t/DyCG7i6ZiC

    Thanks.

Viewing 1 replies (of 1 total)
  • brianfohn

    (@brianfohn)

    WPEngine Employee

    Hey there, thank you for bringing this to our attention!
    We will be releasing an update to the plugin soon to resolve these kinds of issues, in the meantime adding this to your functions.php file should be able to resolve this.

    <?php
    /**
     * Filters the WP Engine GeoIP location names.
     * Removes any slashes in the names.
     *
     * @param  array $geos GeoIP-identified location names.
     * @return array       GeoIP-identified location names without slashes.
     */
    function myprefix_remove_geoip_slashes( $geos ) {
    	return wp_unslash( $geos );
    }
    add_filter( 'geoip_location_values', 'myprefix_remove_geoip_slashes' );
    • This reply was modified 6 years, 9 months ago by brianfohn.
Viewing 1 replies (of 1 total)
  • The topic ‘Location name has apostrophe…’ is closed to new replies.