WordPress.org

Ready to get started?Download WordPress

Forums

Entity encoding (3 posts)

  1. marksw
    Member
    Posted 9 years ago #

    Hi there,
    I've noticed some ommisions in the HTML entity encoding that goes on.
    To give you the background, I usually write my entry in MS Word first (due to poor spelling), and then paste it into the WP editor for publishing.
    I've not had a chance to see how exactly characters are encoded, but I guess you would want to use something like htmlentities($the_post, ENT_QUOTES).
    The reason I point this out is because the RSS feed that is created seems to be broken when I have some of these funny quoted chars in my post.
    Cheers,
    Mark

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I just ran your page through the validator, and it seems that the error may be due to MSWord.
    The character it uses for ' and - looks the same as wp (and the charset it uses), but it is not.
    My suggestions would be:
    - do what you do then replace the faulty characters when you paste into wp by using the wp editor
    - or see if MSWord will save it correctly as a txt file whoch can the nbe used.
    It's not ideal though, but I think the fault lies with the way a word-processor does things as opposed to a web page.

  3. marksw
    Member
    Posted 9 years ago #

    Ahh, I replaced the quotes manually, bot forgot to do the hyphens.
    Maybe there could just be a regexp that replaces the offending characters with the correct ones. If I get a chance I write some translation rules.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.