Title: [Plugin: Google Analytics for WordPress] custom code text code shows slashes (includes fix)
Last modified: August 20, 2016

---

# [Plugin: Google Analytics for WordPress] custom code text code shows slashes (includes fix)

 *  [Stephane Boisvert](https://wordpress.org/support/users/sboisvert/)
 * (@sboisvert)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-custom-code-text-code-shows-slashes-includes-fix/)
 * If you use the custom code box, you will most likely use code that includes ‘
   
   this is handled properly in the output of the plugin as there is a strip slashes
   there, the problem is that there is no strip slashes in the reshowing of that
   information in the plugin admin page. Therefore it will show up with slashes 
   in the admin page. Therefore the next user comes along and if they don’t understand
   that slahes need to be removed before saving whatever change they made, the custom
   code breaks.
 * I’ve made this change to fix the problem, perhaps it is too wide sweeping or 
   perhaps it solves other problems that others may be encountering in text fields.
 * this replaces the whole function
 *     ```
       function textinput($id) {
       			$options = get_option( $this->optionname );
       			$val = '';
       			if ( isset( $options[$id] ) )
       				$val = stripslashes($options[$id]);
       			return '<input class="text" type="text" id="'.$id.'" name="'.$id.'" size="30" value="'.$val.'"/>';
       		}
       ```
   
 * [http://wordpress.org/extend/plugins/google-analytics-for-wordpress/](http://wordpress.org/extend/plugins/google-analytics-for-wordpress/)

The topic ‘[Plugin: Google Analytics for WordPress] custom code text code shows 
slashes (includes fix)’ is closed to new replies.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Stephane Boisvert](https://wordpress.org/support/users/sboisvert/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-custom-code-text-code-shows-slashes-includes-fix/)
 * Status: not resolved