Title: &quot;injects&quot; code when toggle between html &amp; visual editor
Last modified: August 20, 2016

---

# "injects" code when toggle between html & visual editor

 *  [Johmai](https://wordpress.org/support/users/johmai/)
 * (@johmai)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/)
 * Whenever I switch from html mode to visual mode while editing posts I notice 
   this:
    1) Javascript line is inserted at the bottom of each post. I’d like to
   know what the code is because it sends information off-shore. Interestingly, 
   if I disbale Javascript in my browser the code cannot send. Maybe experts know
   what this means? I made sure my version of Java is up to date and deleted old
   version etc. Please note, I’m NOT confusing Java with JavaScript – both are required.
   2) a mere switch from text to html mode _changes_ the post enough that WP prompts
   me to “stay on the page” or press “update” first. 3) custom html is either not
   saved or renders inaccurately in browser. I have also read several other posts
   about this but nothing seems to apply to this case. I disabled plugins, cleared
   browser cache compulsively. Also experimented with tinyMCE alternatives but these
   symptoms persist. I’m now also unable to make backups and the developer whose
   plugin had afforded me this luxury rarely utters a comprehensible phrase. Subsequent
   reinstalls do not offer relief. If you know a protocol to follow or better place
   to be looking for it god bless you today.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/page/2/?output_format=md)

 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959465)
 * Alternating between visual editor and html editor while editing/ creating a post
   sometimes can cause this problem. A link to your site can help us to look for
   the likely causes more precisely.
 *  Thread Starter [Johmai](https://wordpress.org/support/users/johmai/)
 * (@johmai)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959499)
 * Hi, I’m sorry but it’s a local site and I’m using WAMP.
    Is there an alternative
   way for you to see what’s going on?
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959500)
 * I can’t say without looking at what is going on, sorry. Maybe some others may
   be able to tell you.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959517)
 * >  1) Javascript line is inserted at the bottom of each post.
 * That’s not good. Before we get to the “Your WAMP or PC is hacked” try some simple
   things by way of troubleshooting.
 * Have you tried:
 * – Deactivating **all** plugins to see if this resolves the problem. If this works,
   re-activate the plugins one by one until you find the problematic plugin(s).
 * – Switching to the Twenty Eleven theme to rule out any theme-specific problems.
 * – [resetting the plugins folder](http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F)
   by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause
   problems.
 * – Re-uploading the wp-admin and wp-includes folders from a **fresh** download
   of WordPress.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959519)
 * > I made sure my version of Java is up to date and deleted old version etc. Please
   > note, I’m NOT confusing Java with JavaScript – both are required.
 * Wait. What?
 * Sorry, but Java (not Javascript) is absolutely not a requirement for anything
   that ships with WordPress. In fact as much as humanly possible, I don’t install
   Java on any of my PCs.
 *  [insurgenesis](https://wordpress.org/support/users/insurgenesis/)
 * (@insurgenesis)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959520)
 * I was following this advice:
 * > Go here to make sure your Java is working, [http://java.com/en/download/testjava.jsp](http://java.com/en/download/testjava.jsp)
   > What you are seeing (or not seeing) is caused by a javascript error. Have you
   > tried another browser?
 * found here:
    [http://wordpress.org/support/topic/kitchen-sink-is-gone?replies=11](http://wordpress.org/support/topic/kitchen-sink-is-gone?replies=11)
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959521)
 * That’s not really wrong per se in that it does make Java current and working (
   in theory, _DARN YOU ORACLE!!! BRING BACK SUN MICROSYSTEMS!!!_ Ahem) but really,
   Java (not Javascript) and WordPress have nothing to do with each other.
 * If you can, start your WAMP completely from scratch. No plugins, no new themes,
   nada, just plain jane install of WordPress and see if those editor goofyness 
   comes back.
 * If it does, please scan your PC from head to toe. Something is injecting that
   Javascript and it may be outside of your WordPress installation.
 *  Thread Starter [Johmai](https://wordpress.org/support/users/johmai/)
 * (@johmai)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959522)
 * [@jan](https://wordpress.org/support/users/jan/),
    I can’t redo WAMP now. I’ve
   run numerous pc scans – I’m clean. So do you think it gets inserted outside of
   the WP code base? If not, is there an easy way I can use search queries and kill
   the findings using Grep?
 * I also found this directive in root .htaccess (and I didn’t write it):
 * > RewriteEngine on
   >  # Options +FollowSymlinks RewriteCond %{HTTP_REFERER} in.
   > admedia\.com [NC] RewriteRule .* – [F]
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959523)
 * > So do you think it gets inserted outside of the WP code base?
 * Well, something in inserting that Javascript, and that `.htaccess` addition is
   not from stock WordPress, that’s for sure.
 * Is there a non-WAMP WordPress install that you can play with? If it happens there
   too, then it’s probably your PC. If it only happens on WAMP then you may need
   to delouse it as that may mean it’s hacked.
 * Or maybe a plugin is misbehaving: try [my advice above first](http://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor?replies=10#post-3064722).
 *  Thread Starter [Johmai](https://wordpress.org/support/users/johmai/)
 * (@johmai)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959524)
 * Can I check/scan WAMP?
    How do I play with WP without WAMP?
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959530)
 * >  How do I play with WP without WAMP?
 * Home Linux server always works well for me, or a spare VPS lying around. 😛
 * I suggest as a test, you shut down your existing WAMP and give Instant WordPress
   a look.
 * [http://www.instantwp.com/](http://www.instantwp.com/)
 * Except for running on `localhost:4001` it’s easy to setup and the webserver is
   only active when the Instant WordPress app is running. Easy peasy.
 * If the Instant WordPress works without any problem then the issue you are having
   is probably your WAMP installation.
 *  Thread Starter [Johmai](https://wordpress.org/support/users/johmai/)
 * (@johmai)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959541)
 * Is the idea to move across the exact WP install from WAMP or to use a new install?
   
   I’m checking instantWP now and the problems are not recurring, needless to say,
   precisely because the particular WPinstall that it comes with is not _mine_. 
   I don’t see how it can indicate the problem because the problem resides in my
   other install on WAMP.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959542)
 * >  I’m checking instantWP now and the problems are not recurring, needless to
   > say,
 * That’s good because that hopefully has isolated the problem to your WAMP install
   and not necessarily your PC. That’s exactly what I was hoping to confirm and 
   I think you beat me to it a long time ago: it’s your WAMP install.
 * I suggest you just use the InstantWP instead and proceed from there.
 *  Thread Starter [Johmai](https://wordpress.org/support/users/johmai/)
 * (@johmai)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959544)
 * It’s not my PC.
    What if you’re right – what do I do with the stuff on WAMP then?
   I cannot start all over again and I’m not sure my files will be safe if I reinstall
   WAMP. There has to be a search&remove tool to locate the problem either in WAMP
   itself or in WP base code.
 *  [kmessinger](https://wordpress.org/support/users/kmessinger/)
 * (@kmessinger)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/#post-2959545)
 * > Java (not Javascript) and WordPress have nothing to do with each other.
 *  Thanks Jan. Why are things so much clearer first thing in the morning drinking
   a fresh cup of coffee? I stand (actually I sit) corrected.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/page/2/?output_format=md)

The topic ‘"injects" code when toggle between html & visual editor’ is closed to
new replies.

## Tags

 * [text editor](https://wordpress.org/support/topic-tag/text-editor/)
 * [visual editor](https://wordpress.org/support/topic-tag/visual-editor/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 18 replies
 * 6 participants
 * Last reply from: [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/injects-code-when-toggle-between-html-visual-editor/page/2/#post-2959548)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
