Title: Exclude by IP adding http://
Last modified: April 20, 2020

---

# Exclude by IP adding http://

 *  [abrown95](https://wordpress.org/support/users/abrown95/)
 * (@abrown95)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/exclude-by-ip-adding-http/)
 * When I add an IP address that I would like to exclude from recording, after saving
   it, http:// is added before the IP address. The IP address is still recorded.
   Also, when I save a second IP address, http:// is still added to the beginning
   of the line, and the unicode “%20” symbol for a space is added before the second
   IP address, and then neither IP address is excluded.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [JP3](https://wordpress.org/support/users/jp3/)
 * (@jp3)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/exclude-by-ip-adding-http/#post-12745839)
 * Confirmed here too.
 * Looking through the code, I’m not sure why the http:// is being added to the 
   admin options page, but the DB entry for it shows that it’s saving properly, 
   which I’m assuming means that it will also still work properly (we’ll find out
   over time.)
    DB entry in Options table for option_name “wassup_settings”:
 * Single IP exclude:
    `... "wassup_exclude";s:15:"XXX.XXX.XXX.XXX" ...`
 * Multiple IP exclude:
    `... "wassup_exclude";s:28:"XXX.XXX.XXX.XXX, XXX.XXX.X.
   X" ...`
 * I looks like we can ignore it, but it is rather annoying.
 * **
    EDIT: 
   Make sure you take the http:// and %20 out before each save. If they’re
   in there when you save it, they get saved to the DB too, and it wouldn’t work
   right.
 * It appears as tough it’s the “cleanFormText” function being called on wassup_exclude
   on line 732 in wassup.class.php
 * A quick fix would be to change:
    `cleanFormText($_POST['wassup_exclude']);` To:`
   $_POST['wassup_exclude'];` but this is NOT recommended since it does ZERO sanitation
   of the input before saving to the DB. If it’s just you and only you using the
   plugin, maybe you can risk it.
 * Until the plugin author addresses this, we’ll either have to manually remove 
   the http:// and %20, or write our own sanitation function that only strips unwanted
   characters without doing any conversion/encoding.
    -  This reply was modified 6 years, 1 month ago by [JP3](https://wordpress.org/support/users/jp3/).
    -  This reply was modified 6 years, 1 month ago by [JP3](https://wordpress.org/support/users/jp3/).
 *  Thread Starter [abrown95](https://wordpress.org/support/users/abrown95/)
 * (@abrown95)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/exclude-by-ip-adding-http/#post-12747393)
 * I’ve tried saving it again, but each time, the http:// returns. When I go to 
   the options table in my db and remove the http:// directly from there and save
   it, it resets all of my options to the default setting.
 *  [JP3](https://wordpress.org/support/users/jp3/)
 * (@jp3)
 * [6 years ago](https://wordpress.org/support/topic/exclude-by-ip-adding-http/#post-12747845)
 * Strange, as long as I manually remove the “http:// ” and “%20” from my entry 
   before saving, it saves properly in my DB. If they are there when I click save
   then is saves them incorrectly as you describe.
 * My crude fix of raw editing wassup.class.php will solve it for now. Then it won’t
   add those extra characters anymore.
    -  This reply was modified 6 years ago by [JP3](https://wordpress.org/support/users/jp3/).
 *  Plugin Contributor [helened](https://wordpress.org/support/users/helened/)
 * (@helened)
 * [6 years ago](https://wordpress.org/support/topic/exclude-by-ip-adding-http/#post-12770620)
 * Hi ABrown95,
 * Thanks for reporting this problem!
 * Fortunately, the fix is an easy one that you can do yourself if you are comfortable
   working with code: in WordPress plugin editor, edit the file “lib/settings.php”
   and replace the ‘esc_url’ with ‘esc_attr’ and that’s it.
 * You can view this fix on Github [here](https://github.com/michelem09/wassup/commit/126f0ae581eff6d3f10ac688257c44af9cac5dd1?diff=unified)
 *  Thread Starter [abrown95](https://wordpress.org/support/users/abrown95/)
 * (@abrown95)
 * [6 years ago](https://wordpress.org/support/topic/exclude-by-ip-adding-http/#post-12773879)
 * Thanks! That seems to have worked.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Exclude by IP adding http://’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wassup_f2eef0.svg)
 * [WassUp Real Time Analytics](https://wordpress.org/plugins/wassup/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wassup/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wassup/)
 * [Active Topics](https://wordpress.org/support/plugin/wassup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wassup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wassup/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [abrown95](https://wordpress.org/support/users/abrown95/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/exclude-by-ip-adding-http/#post-12773879)
 * Status: not resolved