WordPress.org

Ready to get started?Download WordPress

Forums

Turn off BR filter... (45 posts)

  1. partriv
    Member
    Posted 7 years ago #

    i really need a solution to this problem asap. WordPress is converting my linebreaks to <br/> and i rreally cant have that :( did anything work for anyone?

  2. partriv
    Member
    Posted 7 years ago #

    used this thread as a solution, but no options in the UI.

  3. Ballena
    Member
    Posted 7 years ago #

    "Note: Topic started 2 years ago...Topic NOT resolved..."

    It's sick. I have the same problem as you all have. WP adds a lot of br and p everywhere and breaks my code :/

  4. Chris_K
    Member
    Posted 7 years ago #

    ... which is why there are TONS of plugins in use for just this very purpose.
    ... which is why many OTHER threads on the exact same topic ARE resolved.

    Several good ones are mentioned in this very similar thread: http://wordpress.org/support/topic/55087?replies=22

  5. realish
    Member
    Posted 7 years ago #

    HandySolo,

    Sorry to burst your bubble, but I've been to those other threads and NONE of the plugins linked there do what everyone in this thread is asking for. Some of them allow you to post code snippets, but that's a narrow problem.

    What I want -- and I'm obviously not the only one -- is the option to have WordPress only use the HTML that I explicitly include. That means not adding those obnoxious line breaks and paragraph marks. Every other CMS I've used has this option. It's a simple check box -- how confusing could it really be?

    Has anyone found a plugin that actually does this? The latest one I tried was TextControl, but -- shocker -- it didn't work.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    realish: The fact is that most people don't care about this. WordPress is not expecting you to write HTML code. It's expecting you to write text. That's sort of the whole point of having a CMS in the first place, so that you don't *have* to write HTML every time. These features are there because people want them. There's no "off switch" because extremely few people would use it.

    If you want to disable most everything automatic WordPress does:

    Install and activate this plugin:
    http://ottodestruct.com/wpstuff/disableautop.zip

    You'll also want to turn off "Use the visual rich editor when writing" on your Users page and "WordPress should correct invalidly nested XHTML automatically" on Options->Writing.

    That should cover most of it.

  7. realish
    Member
    Posted 7 years ago #

    Otto, that's a weak argument. "Most" WP users don't want to do anything but post periodic text chunks, yes. But why not allow power users more control, if only in the advanced options?

    For my part, I'm importing a buttload of posts from a previous blog. Those posts already have the HTML coded in them, and the additional p's and br's WP is adding is making them look stupid. So I want to disable the stupid filer on *those posts*, but not on future posts.

    I honestly can't believe nobody's written a straightforward plugin to do this. Can it really be that hard?

  8. realish
    Member
    Posted 7 years ago #

    Sorry, Otto, that came off a little snippier than I intended. I appreciate you trying to help. I just can't believe something this fundamental has been left out of WP. It never would have occurred to me to even ask about it. Now I'm rethinking my decision to switch to WP at all.

  9. realish
    Member
    Posted 7 years ago #

    Oh, and FYI: Otto, I installed and activated your plugin, and WP is STILL adding p tags around my HTML.

    Maddening.

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    realish: Did you turn off the visual rich editor as well? It's a javascript editor, and it might be adding those tags before it submits your post to the server. Turning it off goes back to the simpler non-WYSIWYG editor.

    The plugin disables the "wpautop" function for content, which is what adds P's and BR's and such after the fact. However, if your actual post has them in it, then the plugin will not change that.

    And the plugin does work. I just confirmed it.

  11. realish
    Member
    Posted 7 years ago #

    OK, let me be a little more specific about what's happening.

    First, yes, all three boxes on the Options > Writing page are unchecked. Confirmed. Your plugin turning off wpautop is activated. Confirmed.

    I have a post with a table in it, composed of image thumbnails. (Yes, I know tables suck, and I no longer use them, but these are old legacy posts, and there are a bunch of them.) The first bit looks like this:

    <table cellpadding="5" cellspacing="5">
    <tr>
    <td><img src="/images/dcnyc/tn_dcnyc01.jpg" alt="dcnyc01.jpg" width="100" height="75"/></td>

    And so on, with many cells and rows.

    When I publish and view source, here's what it looks like:

    <p><table cellpadding="5" cellspacing="5">
    <tr>
    <td><img src="/images/dcnyc/tn_dcnyc01.jpg" alt="dcnyc01.jpg" width="100" height="75"/></td></p>

    I'm at a loss. How can I keep this unwanted, unrequested code from screwing up my posts against my will? And what kind of insane CMS forces this stuff on me with no way for me to turn it off?

  12. realish
    Member
    Posted 7 years ago #

    Hm ... there were a bunch of < br > tags in the code sample above, but they got screened out. You get the point.

  13. Chris_K
    Member
    Posted 7 years ago #

    I missed your answer to:

    Did you turn off the visual rich editor as well? It's a javascript editor, and it might be adding those tags before it submits your post to the server. Turning it off goes back to the simpler non-WYSIWYG editor.

    It's not controlled at Options -> Writing.
    It's controlled by visiting Users -> Your Profile and unchecking the bottom checkbox (something about using Visual Rich Editor as I recall).

  14. realish
    Member
    Posted 7 years ago #

    Nope, HandySolo, it's not checked there either -- never has been, as far as I know.

  15. susb8383
    Member
    Posted 7 years ago #

    Just wanted to throw in my 2 cents about why being able to turn off the auto-inclusion of tags is a desireable feature.

    I'm not an advanced user of WordPress by any means and I have very, very simple websites. They consist of some very basic posts and a Contact Us page.

    Most people with Contact Us pages are using form handlers. And most form handlers use hidden input fields to tell them certain information such as what confirmation page to go to once the form is posted.

    So if I want to put each hidden input field on a separate line for readability, WP adds a BR to the end of each. Since the fields are hidden, what shows to the user is a ton of space before the submit button that looks like it is there for no apparent reason.

    Just wanted to give an example of how the autoformat feature is troublesome even to an inexperienced WordPress user like me who isn't trying to do anything complicated.

    I agree with the above posts; if I turn off the WYSIWYG editor, I don't want WP to give me partial WYSIWYG. But I realize some people may like this feature, so a way to turn it off for those of us who don't want it would be great.

    I'd settle for a way to see the straight HTML code and edit these out myself, but I don't see that when the wysiwyg editor is turned off.

Topic Closed

This topic has been closed to new replies.

About this Topic