Title: Problem with WordPress editing code
Last modified: August 19, 2016

---

# Problem with WordPress editing code

 *  [areyouscreening](https://wordpress.org/support/users/areyouscreening/)
 * (@areyouscreening)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/)
 * I’m having a problem getting a page to work, and it is apparently the result 
   of WordPress changing things.
 * Oddly, I must have found some way around this before, because this used to work,
   but after a recent server and theme change, now it doesn’t.
 * At any rate, I need a page to have this code-
 * <!– SPRINGBOARD TEASER PLAYER –>
    <div id=”sb_video_player”></div> <script language
   =”javascript” type=”text/javascript” src=”[http://publishers.springboard.gorillanation.com/js/swfobject.js”></script&gt](http://publishers.springboard.gorillanation.com/js/swfobject.js”></script&gt);
   <script language=”javascript”> function get_url_param(name){ name = name.replace(/[\[]/,”\\\[“).
   replace(/[\]]/,”\\\]”); var regexS = “[\\?&]”+name+”=([^&#]*)”; var regex = new
   RegExp( regexS ); var results = regex.exec( window.location.href ); if( results
   == null ) return “sb_error_code”; else return results[1]; } function getVideo(){
   var so = new SWFObject(“[http://cdn.springboard.gorillanation.com/storage/xplayer/yo033.swf&#8221](http://cdn.springboard.gorillanation.com/storage/xplayer/yo033.swf&#8221);,“
   mplayer”, “520”, “400”, “8”, “#000000”); so.addParam(“swliveconnect”, “true”);
   so.addParam(“allowfullscreen”, “true”); so.addVariable(“pid”, “arey012”); so.
   addVariable(“siteId”, “379”); so.addVariable(“autostart”, “true”); so.addVariable(“
   file”, “[http://publishers.springboard.gorillanation.com/xml_feeds_advanced/index/”+get_url_param(‘sb_partner_id&#8217](http://publishers.springboard.gorillanation.com/xml_feeds_advanced/index/”+get_url_param(‘sb_partner_id&#8217);)
   +”/3/”+get_url_param(‘sb_video_id’)+”/0/0/0/0/0/0/0”); so.addVariable(“pageUrl”,
   escape(document.location)); so.write(“sb_video_player”); } function sb_play_video(){
   if(get_url_param(‘sb_video_id’)!= ‘sb_error_code’ && get_url_param(‘sb_partner_id’)!
   = ‘sb_error_code’){ getVideo(); }else{ //alert(‘error’); } } </script> <script
   language=”javascript”>sb_play_video();</script> <!– SPRINGBOARD TEASER PLAYER–
   >
 * But by the time WordPress is done it looks like this-
 * <p><!– SPRINGBOARD TEASER PLAYER –></p>
    <div id=”sb_video_player”></div> <p>
   <script language=”javascript” type=”text/javascript” src=”[http://publishers.springboard.gorillanation.com/js/swfobject.js”></script&gt](http://publishers.springboard.gorillanation.com/js/swfobject.js”></script&gt);
   <script language=”javascript”></p> <p>function get_url_param(name){ name = name.
   replace(/[\[]/,”\\\[“).replace(/[\]]/,”\\\]”); var regexS = “[\\?&]”+name+”=([
   ^&#]*)”; var regex = new RegExp( regexS ); var results = regex.exec( window.location.
   href ); if( results == null ) return “sb_error_code”; else return results[1];}
   </p> <p>function getVideo() { var so = new SWFObject(“[http://cdn.springboard.gorillanation.com/storage/xplayer/yo033.swf&#8221](http://cdn.springboard.gorillanation.com/storage/xplayer/yo033.swf&#8221);,“
   mplayer”, “520”, “400”, “8”, “#000000”); so.addParam(“swliveconnect”, “true”);
   so.addParam(“allowfullscreen”, “true”); so.addVariable(“pid”, “arey012”); so.
   addVariable(“siteId”, “379”); so.addVariable(“autostart”, “true”); so.addVariable(“
   file”, “[http://publishers.springboard.gorillanation.com/xml_feeds_advanced/index/”+get_url_param(‘sb_partner_id&#8217](http://publishers.springboard.gorillanation.com/xml_feeds_advanced/index/”+get_url_param(‘sb_partner_id&#8217);)
   +”/3/”+get_url_param(‘sb_video_id’)+”/0/0/0/0/0/0/0”); so.addVariable(“pageUrl”,
   escape(document.location)); so.write(“sb_video_player”); } function sb_play_video(){
   if(get_url_param(‘sb_video_id’)!= ‘sb_error_code’ && get_url_param(‘sb_partner_id’)!
   = ‘sb_error_code’){ getVideo(); }else{ //alert(‘error’); } } </script> <script
   language=”javascript”>sb_play_video();</script> <!– SPRINGBOARD TEASER PLAYER–
   ></p>
 * Any ideas how I can get WordPress to stop adding and changing things.
 * Thanks very much.

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

 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849030)
 * Just to clarify, are you placing this code in the source for the actual page 
   template, or are you trying to paste it into a page created in the WordPress 
   editor (using either wysiwyg or html mode)?
 *  Thread Starter [areyouscreening](https://wordpress.org/support/users/areyouscreening/)
 * (@areyouscreening)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849034)
 * I’m putting it in the WordPress editor in html mode.
 * It’s the page of my site [http://www.areyouscreening.com/video-player](http://www.areyouscreening.com/video-player)
   which is supposed to play videos from a little widget I have in the sidebar.
 * I don’t know if that is meaningless information, but I thought it might help.
 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849037)
 * So the only adverse effect that you see is the automatic addition of the “p” 
   tags? (I didn’t compare the files to your source, but it looks that way at a 
   glance). Sometimes posting in the html editor and then switching back to wysiwyg
   for a preview before publishing will bork things up.
 * If that doesn’t change anything, maybe a plugin to temporarily remove/disable
   the “autop” filter in the editor might assist in diagnosing the issue.
 *  Thread Starter [areyouscreening](https://wordpress.org/support/users/areyouscreening/)
 * (@areyouscreening)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849047)
 * There’s more than just the “p” tags, there are some line breaks and so on, but
   I guess that’s most of it.
 * Is there a plugin that would keep it from doing this?
 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849209)
 * Take a look at this document, and see if it seems like it’s on the right track.
   If it is, it might be just as easy to quickly disable the filter from your themes
   functions file, to see if that makes the difference. That might actually be more
   practical than a plugin.
 * [http://codex.wordpress.org/Function_Reference/wpautop](http://codex.wordpress.org/Function_Reference/wpautop)
 * [http://codex.wordpress.org/Function_Reference/wpautop#Disabling_the_filter](http://codex.wordpress.org/Function_Reference/wpautop#Disabling_the_filter)
 * There is a link to a plugin suggested in that article, that allows it to be managed
   on a per post basis, as well. That might be handy if it turns out to be the issue.
 * [http://wordpress.org/extend/plugins/wpautop-control/](http://wordpress.org/extend/plugins/wpautop-control/)
 *  Thread Starter [areyouscreening](https://wordpress.org/support/users/areyouscreening/)
 * (@areyouscreening)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849221)
 * Ok, I think that works… almost.
 * As far as I can tell, that got rid of the “p” tags and breaks, and whatever, 
   but there’s still a problem.
 * It apparently didn’t come through when I put the code up top, but there are three
   spots in the code where & gets #038; added after it.
 * Is that a completely different thing?
 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849223)
 * I’m not sure what the html encoding should be for the ampersand in this case.
   I think that one might be over my head.
 *  Thread Starter [areyouscreening](https://wordpress.org/support/users/areyouscreening/)
 * (@areyouscreening)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849224)
 * Hey, I got it to work.
 * I got this plugin
 * [http://wordpress.org/extend/plugins/xhanch-my-advanced-settings/](http://wordpress.org/extend/plugins/xhanch-my-advanced-settings/)
 * and it has options to turn off texturize (which I don’t think was my problem)
   and to turn off character conversion.
 * Works now.
 * Thanks a lot for the help.
 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849225)
 * Glad you got it working!

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

The topic ‘Problem with WordPress editing code’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/problem-with-wordpress-editing-code/#post-1849225)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
