Forums

WP cannot digest HTML tags (7 posts)

  1. pieroland
    Member
    Posted 4 years ago #

    Hi! Every time that I want to insert HTML tags in a post, WP doesn't publish it and doesn't even show me the post preview.
    So I can't insert links, lists, ... neither in visual-edit nor in HTML-edit mode.

    Is there any setting that I should change in order to enable HTML?

    I thought it could depend on my hosting service, but the rest of my website is working perfectly.

    Thank you :)

  2. pieroland
    Member
    Posted 4 years ago #

    Update: I modified a post inserting some HTML tags (links, lists) directly on the database. It works perfectly: the links are shown and are working!

    So I guess the problem is in the way WP translates the HTML tags from the editor to the DB.

    How can I correct that?

  3. moshu
    Member
    Posted 4 years ago #

    You want your html tags?
    Then why are you using the ugly wysiwyg thing?
    People who know code - don't need the wysiwyg.
    Turn it OFF. Forever. WP will never touch your code.

  4. StrangeAttractor
    Member
    Posted 4 years ago #

    You want your html tags?
    Then why are you using the ugly wysiwyg thing?
    People who know code - don't need the wysiwyg.
    Turn it OFF. Forever. WP will never touch your code.

    He did say he tried it in the HTML mode as well.

    So I can't insert links, lists, ... neither in visual-edit nor in HTML-edit mode.

    Does having the WYSISWYG editor turned on affect the behavior of the HTML view? (Serious question.)

  5. moshu
    Member
    Posted 4 years ago #

    Does having the WYSISWYG editor turned on affect the behavior of the HTML view? (Serious question.)

    Did not test it thoroughly in 2.5 or 2.5.1. Yet.
    In earlier versions it did, big time! Meaning, if the wysiwyg/visual was on, despite you switching between code/visual, at the moment of saving the post the wysiwyg was in effect (=on)... messing around with whatever html you put in manually. That was the reason you always got the reply: turn it off.

    So, again, remember: switching between Code/visual and turning off the wysiwyg monster is not the same!

  6. pieroland
    Member
    Posted 4 years ago #

    Moshu, I'm glad you know the code but that's not very helpful to me :-)
    Moreover if WYSIWYG had problems with HTML tags creation, it wouldn't be helpful at all. (I always use HTML editor, however).
    Could you please tell me how to safely turn the WYSIWYG off?

    The workaround that I found is to write a dummy post without links, list and image, so that a new well-configured DB entry is create, and then enter the real HTML post directly into the database.

    The next thing I would (ehm) "like" to do is to have a look at the php files and see what's happening... but I still hope that somebody else, more skilled than me, already did this and could help me.

    I forgot to say that this behaviour takes place with or without plugins and not only affects links, lists and images but also text formatting (italic, bold, ...).

    Thank you.

  7. Andrew Ozz
    WordPress Dev
    Posted 4 years ago #

    In 2.5 if saving from the HTML editor, the visual editor doesn't touch the content and doesn't run any cleanup.

    However kses() still runs on saving a post from any editor (or even if you delete both and use plain textarea) with the "wp_filter_post_kses" filter. If you are logged in as admin, that shouldn't strip any tags.

    Perhaps try making new admin user and see if that still happens. If yes, delete both wp-includes and wp-admin directories and upload fresh copies.

Topic Closed

This topic has been closed to new replies.

About this Topic