WordPress.org

Ready to get started?Download WordPress

Forums

Quotes (3 posts)

  1. Steve
    Member
    Posted 4 years ago #

    I'm being driven mad by what WP is doing with my quotes when it goes through apply_filters(the_excerpt,$excerpt)

    Basically all quotes both " and ' are turned into ” and ‘

    also get_the_title($postid) seems to do the same.

    Obviously WP is doing this for a reason but how can I turn them back into normal quotes as I'm passing them on to another app and its turning them into unicode sequences.

  2. s_ha_dum
    Member
    Posted 4 years ago #

    The function doing that is wptexturize(). You can disable the filter with remove_filter() but I'm thinking you should also be able to add, say, a <p> tag to the no_texturize_tags filter hooks and avoid disabling the whole wptexturize function.

  3. Steve
    Member
    Posted 4 years ago #

    Thanks for that. I've fixed it with a str_replace command for now. The real problem was that I was pushing stuff through the Facebook API and it turns them all into unicode.

    It does seem rather drastic that the only way to solve this is to turn it off on whole filters, and of course as I'm developing code that others might use I can't really go round turning off their filters.

Topic Closed

This topic has been closed to new replies.

About this Topic