Support » Fixing WordPress » HTML being stripped on save

  • Hi,

    I have recently bump into a rather annoying issue and one I am unable to resolve. I have removed all plugins, switched to Twenty Eleven to see if this was theme related and still the issue persists.

    The problem is that I am unable to reproduce it on new WordPress installations and also find the trigger or cause of the issue.

    Basically, when I add certain types of HTML, the code is being stripped and therefore isn’t working.

    An example of this can be see below:

    I add this to a page:

    <div style="font-size: 24px;">
      <i class="icon-camera-retro icon-large"></i> icon-camera-retro
    </div>

    When I then view the page and view the code in source, it appears like this:

    <div style="font-size: 24px">
      <i></i> icon-camera-retro
    </div>

    No plugins active
    No custom code
    It happens on twenty eleven, so not theme related
    I have visual editor disabled
    I have “WordPress should correct invalidly nested XHTML automatically” unchecked.

    Can anyone assist please.

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    If you add to the HTML editor,

    <div style="font-size: 24px;">
      <i class="icon-camera-retro icon-large">italic</i> icon-camera-retro
    </div>

    Does the same happen?

    Yes, same thing happens unfortunately, really annoying the hell out of me this.

    <div style="font-size: 24px">
      <i>italic</i> icon-camera-retro
    </div>

    Was this issue ever resolved?
    I’ve run into the same situation.
    I have no idea how to reproduce the problem.
    But h2 tags are being switched out for html and all shortcode tags are being stripped out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML being stripped on save’ is closed to new replies.