• what’s the point of letting me put in HTML if it’s just going to change it and break it?

    Here’s what I type in the Text tab:

    <iframe id=”iframe” src=”idreesinc.com/research.html” />
    <input type=”button” onclick=”setURL(‘URLHere’)” />

    Here’s what I see when I click on the Visual tab, then back to the Text tab:

    <iframe id=”iframe” src=”idreesinc.com/research.html” height=”240″ width=”320″></iframe>

    Is there a plugin that I can install called “Make wordpress stop breaking my site”?

    this should be a very simple thing. Is this particular code not supported for some reason by WP? It’s simple javascript.

    thanks in advance for any tips/tricks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Out of the box, WordPress doesn’t change it like that. At best, paragraph tags and BR tags are added.

    Tried it on my test site (see http://wp.senff.com/?p=56 )

    Code I entered in the post:

    <iframe id="iframe" src="idreesinc.com/research.html" />
    <input type="button" onclick="setURL('URLHere')" />

    Code that’s in the site:

    <p><iframe id="iframe" src="idreesinc.com/research.html" /><br />
    <input type="button" onclick="setURL('URLHere')" /></p>

    Whatever’s adding those dimensions to your iframe, it may be a plugin? It’s not WordPress itself. Or maybe it’s in the theme you’re using.

    However, keep in mind that your code is already broken to begin with. An iframe is NOT a self-closing element and you have to use </iframe> in order to have valid code.

    Correct would be this: http://wp.senff.com/?p=77

    Thread Starter James Welbes

    (@highprrrr)

    brand new site, haven’t added any plugins yet.

    I went to Users > Your Profile and checked “Disable the visual editor when writing” Now it doesn’t change my HTML anymore.

    Trust me, I tested it like a dozen times. Everytime I pasted in that first bit, clicked Visual, and clicked Text again, it changed it to the second bit.

    I got it all working now. I haven’t sorted out the image I’m going to use on the bottom, but I got all three of my thumbnails mouseovers working and what-not, now that WordPress isn’t deleting my code anymore…

    Going back and forth from text to visual has always been a problem for many. They are encouraged to pick one and stay with it.

    Thread Starter James Welbes

    (@highprrrr)

    that’s really enoying. I’m not a coding expert, I don’t really want to edit the entire site in code, but I do need to tweek it sometimes.

    I feel like this is a very basic thing that WP should have figured out by now. It’s my site if I want to break it I should be able to break it, I don’t need WP babysitting my code for me.

    You don’t have to edit the entire site in code, but when you enter actual code, then yes, you should go to the Text tab.

    If you paste code in the Visual tab, then it won’t be treated as clean code but as “styled code” so to speak. WordPress can’t tell for sure if you want code to be executed or if you want it to show the way you entered it.

    I agree it can be a little annoying, and come across that WordPress is babysitting your code, but then again, there’s something to be said about entering invalid code as well. 🙂

    Thread Starter James Welbes

    (@highprrrr)

    Senff, I understand the difference between the Visual tab and the Text tab. My issue is taht when I enter it in the Text tab, if I click the visual tab and then click right back on the text tab, my Code is changed! And its not just reorganized, in my example it actually deleted an entire line of code.

    So in order to make WordPress stop doing that, I had to disable the Visual tab in my settings. Which means I’m not editing the site completely in code. I don’t want to enable the visual tab and have wordpress delete my code for the 10th time. I just created a second Test page that I try things out in to make sure the code is good then I drop it in the real page.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wordpress changes my HTML’ is closed to new replies.