WordPress.org

Ready to get started?Download WordPress

Forums

Convert HTML entities (8 posts)

  1. leemon
    Member
    Posted 2 years ago #

    Hi!

    Is there a way to convert HTML entities in posts automatically with a filter? I collaborate in a blog with multiple authors and one of them uses Dreamweaver to write his posts and then he pastes them (ridden with HTML entities) in the WP editor. Does WP have a filter for dealing with this situation?

    Thanks in advance

  2. peredur
    Member
    Posted 2 years ago #

    Use the 'HTML' tab on the editor?

    Why would anyone want to use DreamWeaver to write WordPress posts? Is he just trying to justify spending all that money?

    :-)

    Cheers

    PAE

  3. peredur
    Member
    Posted 2 years ago #

    Oh! Or am I misunderstanding you? Do you not want the characters represented by the entities to show up? For example, do you want an em-dash to show up as a hyphen instead of an em-dash, or a non-breaking space to show up as an ordinary space?

    Cheers

    PAE

  4. leemon
    Member
    Posted 2 years ago #

    I tried to disuade him from using DW to write his posts with no success. His posts show up correctly in the blog, but they are almost unreadable in the post editor because of the amount of HTML entities in them. I wanted to know if there was a way to convert these entities to UTF-8 characters because our database already supports this character encoding.

    Thanks

  5. peredur
    Member
    Posted 2 years ago #

    I think if he pastes into the 'HTML' part of TinyMCE, you'll find that the entities are converted when moving back to 'Visual'. That's what happens for me, anyway.

    I need to enter HTML entities for Welsh character codes like: ŵ

    So I type them (or paste them) into the HTML side of TinyMCE and they are always converted when I move back.

    Cheers

    PAE

  6. peredur
    Member
    Posted 2 years ago #

    Heh! The conversion just got done, didn't it. That entity was:

    & # 3 7 3 ;

    (remove the spaces)

    PAE

  7. leemon
    Member
    Posted 2 years ago #

    Thanks peredur!

  8. peredur
    Member
    Posted 2 years ago #

    De nada.

Topic Closed

This topic has been closed to new replies.

About this Topic