Title: [WPads Plugin] Adding forward slashes in html code?
Last modified: August 19, 2016

---

# [WPads Plugin] Adding forward slashes in html code?

 *  [triplemoons](https://wordpress.org/support/users/triplemoons/)
 * (@triplemoons)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/)
 * Been using this for some time and all of a sudden it’s adding forward slashes
   after saving the ads.
 * This:
    `<a href="http://s14.photobucket.com/albums/a312/triplemoons/banners/?
   action=view&current=tme-mini.jpg" target="_blank\"><img src="http://i14.photobucket.
   com/albums/a312/triplemoons/banners/tme-mini.jpg" border="0" alt="Photobucket"
   ></a>`
 * Is turning into this:
    `<a href=\"http://s14.photobucket.com/albums/a312/triplemoons/
   banners/?action=view&current=tme-mini.jpg\" target=\"_blank\"><img src=\"http://
   i14.photobucket.com/albums/a312/triplemoons/banners/tme-mini.jpg\" border=\"0\"
   alt=\"Photobucket\"></a>`
 * The 2.9 upgrade might be at fault?

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

 *  [siamtiger](https://wordpress.org/support/users/siamtiger/)
 * (@siamtiger)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/#post-1327786)
 * I have the same problem, does anoyone know a solution for this one?
 *  Thread Starter [triplemoons](https://wordpress.org/support/users/triplemoons/)
 * (@triplemoons)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/#post-1327787)
 * Well, at least I am not alone! 😉
 * I posted on the [creaters blog](http://thesandbox.wordpress.com/wpads/) notifying
   him of the problem. You might want to go on as well and reiterate it.
 *  [Justin Cline](https://wordpress.org/support/users/ryugraphix/)
 * (@ryugraphix)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/#post-1327791)
 * I am getting the same problem too!
 *  [devrahall](https://wordpress.org/support/users/devrahall/)
 * (@devrahall)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/#post-1327864)
 * Has there been any word on this? Any fix or work-around in the interim?
    I am
   desperate to get my ads back up.
 *  [nodesigns](https://wordpress.org/support/users/nodesigns/)
 * (@nodesigns)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/#post-1327865)
 * I have same problem too. Anyone has solution?
 *  [jtimar](https://wordpress.org/support/users/jtimar/)
 * (@jtimar)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/#post-1327880)
 * The problem is that the plugin relies on PHP having “magic quotes” turned on.
   If you turn magic quotes on in your PHP.ini, WPads starts working again.
 * The problem is that magic quotes are a depreciated feature which are to be removed
   from PHP, as a result, the latests version of wordpres seem to be coded to eliminate
   dependence on that fearture, so turning magic quotes on, actually breaks some
   wordpress core features.
 * So either the author has to come back from the dead and fix his plugin, someone
   else has to fix his plugin, or we need a new plugin.
 * Anybody know how to do it?
 *  [alhoseany](https://wordpress.org/support/users/alhoseany/)
 * (@alhoseany)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/#post-1327900)
 * hi, i think i fix the “magic quotes” thing. thanks jtimar.
 * what i did is i edit the wpads-class.php file of the plugin and removed the escape
   function both in update and add new banner. i know this may be risky but you 
   are the only one using the add or edit banner form. so, check what you are putting
   in 1st.
 *     ```
       /**
           * Update data for a banner
           */
           function updateBanner( $banner ) {
               global $wpdb;
   
               if( $banner["banner_active"] != "Y" ) {
                   $banner["banner_active"] = "N";
               }
               $banner["banner_zones"] = $this->zonesUserToDB( $banner["banner_zones"] );
               $sql = "UPDATE " . $this->banners_table . " SET "
                   ." banner_description = '" . $wpdb->escape( $banner["banner_description"] ) . "', "
                   ." banner_html = '" . $wpdb->escape( $banner["banner_html"] ) . "', "
                   ." banner_zones = '" . $banner["banner_zones"] . "', "
                   ." banner_active = '" . $banner["banner_active"] . "', "
                   ." banner_weight = '" . $banner["banner_weight"] . "', "
                   ." banner_maxviews = '" . $banner["banner_maxviews"] . "' "
                   ." WHERE banner_id = '" . $banner["banner_id"] . "' ";
               $wpdb->query( $sql );
           }
       ```
   
 * that is the original update function code. i changed it to:
 *     ```
       /**
           * Update data for a banner
           */
           function updateBanner( $banner ) {
               global $wpdb;
   
               if( $banner["banner_active"] != "Y" ) {
                   $banner["banner_active"] = "N";
               }
               $banner["banner_zones"] = $this->zonesUserToDB( $banner["banner_zones"] );
               $sql = "UPDATE " . $this->banners_table . " SET "
                   ." banner_description = '" . $wpdb->escape( $banner["banner_description"] ) . "', "
                   ." banner_html = '" .   $banner["banner_html"]   . "', "
                   ." banner_zones = '" . $banner["banner_zones"] . "', "
                   ." banner_active = '" . $banner["banner_active"] . "', "
                   ." banner_weight = '" . $banner["banner_weight"] . "', "
                   ." banner_maxviews = '" . $banner["banner_maxviews"] . "' "
                   ." WHERE banner_id = '" . $banner["banner_id"] . "' ";
               $wpdb->query( $sql );
           }
       ```
   
 * also, the add banner function
 *     ```
       /**
           * Add a new banner to the database
           */
           function addBanner( $banner ) {
               global $wpdb;
   
               if( $banner["banner_active"] != "Y" ) {
                   $banner["banner_active"] = "N";
               }
               $banner["banner_zones"] = $this->zonesUserToDB( $banner["banner_zones"] );
               $sql = "INSERT INTO " . $this->banners_table . " SET "
                   ." banner_description = '" . $wpdb->escape( $banner["banner_description"] ) . "', "
                   ." banner_html = '" . $wpdb->escape( $banner["banner_html"] ). "', "
                   ." banner_zones = '" . $banner["banner_zones"] . "', "
                   ." banner_active = '" . $banner["banner_active"] . "', "
                   ." banner_weight = '" . $banner["banner_weight"] . "', "
                   ." banner_maxviews = '" . $banner["banner_maxviews"] . "' ";
               $wpdb->query( $sql );
           }
       ```
   
 * this is the original add new banner function. i changed it into :
 *     ```
       /**
           * Add a new banner to the database
           */
           function addBanner( $banner ) {
               global $wpdb;
   
               if( $banner["banner_active"] != "Y" ) {
                   $banner["banner_active"] = "N";
               }
               $banner["banner_zones"] = $this->zonesUserToDB( $banner["banner_zones"] );
               $sql = "INSERT INTO " . $this->banners_table . " SET "
                   ." banner_description = '" . $banner["banner_description"]   . "', "
                   ." banner_html = '" . $wpdb->escape( $banner["banner_html"] ). "', "
                   ." banner_zones = '" . $banner["banner_zones"] . "', "
                   ." banner_active = '" . $banner["banner_active"] . "', "
                   ." banner_weight = '" . $banner["banner_weight"] . "', "
                   ." banner_maxviews = '" . $banner["banner_maxviews"] . "' ";
               $wpdb->query( $sql );
           }
       ```
   
 * i hope this works for you too. it did for me. and i hope a php developer look
   into this.
 * thanks

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

The topic ‘[WPads Plugin] Adding forward slashes in html code?’ is closed to new
replies.

## Tags

 * [html code](https://wordpress.org/support/topic-tag/html-code/)

 * 7 replies
 * 7 participants
 * Last reply from: [alhoseany](https://wordpress.org/support/users/alhoseany/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/wpads-plugin-adding-forward-slashes-in-html-code/#post-1327900)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
