WordPress.org

Ready to get started?Download WordPress

Forums

Facebook
social publisher : remove html tags (13 posts)

  1. fatchoumakou
    Member
    Posted 1 year ago #

    Hello how to remove html tags in articles published with social publisher ?

    Thank you

    http://wordpress.org/extend/plugins/facebook/

  2. agig112
    Member
    Posted 1 year ago #

    Same question here, because this looks awful. :p

  3. agig112
    Member
    Posted 1 year ago #

    Actually, I solved the problem, you have to add strip_tags() to the 'caption' and 'description' rows in fb-social-publisher.php.

    So from this:

    'caption' => apply_filters( 'the_excerpt', get_the_excerpt() ),
    'description' => fb_strip_and_format_desc( $post ),

    you'll get this at 6 occurrences:

    'caption' => strip_tags( apply_filters( 'the_excerpt', get_the_excerpt() ) ),
    'description' => strip_tags( fb_strip_and_format_desc( $post ) ),

    Don't forget the ')'-s before the commas. :)

    I still couldn't fix that hyphens are not to be converted to #&8211; in the published post.

  4. fatchoumakou
    Member
    Posted 1 year ago #

    Thank you for your solution. It works fine

    Note : Facebook is also preparing a fix for next version of the extension (see this message).

  5. agig112
    Member
    Posted 1 year ago #

    Oh, great, thanks!

  6. Matt Kelly (Facebook)
    Member
    Plugin Contributor

    Posted 1 year ago #

    Thanks @agig112! Would you mind contributing the code to https://github.com/facebook/wordpress?

  7. agig112
    Member
    Posted 1 year ago #

    Yeah, sure. :)

  8. Matthew Hui
    Member
    Plugin Contributor

    Posted 1 year ago #

    How do you get hyphens to show as #&8211;? They work fine on my site

  9. Matt Kelly (Facebook)
    Member
    Plugin Contributor

    Posted 1 year ago #

    @agig112, did you submit a pull request at https://github.com/facebook/wordpress? Thanks!

  10. Matt Kelly (Facebook)
    Member
    Plugin Contributor

    Posted 1 year ago #

  11. Corineb
    Member
    Posted 1 year ago #

    @agig112 thank you so much! I am not technical at all but I managed to follow your fix and it workes!!!

  12. kiyoshiblog
    Member
    Posted 1 year ago #

    thanks, you're ace.
    worked perfectly!

    ALSO, to *stop thee weird #&8211;* you can use this character:
    "−"

    do not use this character:
    "-" (yes, it's different! this one fails while the top one works)

  13. agig112
    Member
    Posted 1 year ago #

    Yes, I figured this out too, you have to paste special characters directly in the title and the beginning of the post. From here (Column "Display").

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.