WordPress.org

Ready to get started?Download WordPress

Forums

Facebook
Ugly HTML characters in FB post (9 posts)

  1. J. K.
    Member
    Posted 1 year ago #

    Hi there,

    Love the plugin but there's one thing I hope can be fixed:
    When I post on my wp blog and its sent to my fb page it doesn't translate the special characters very well, resulting in something like:

    Title & Title – Title
    <p>Post with visible HTML tags

    Can this be fixed?
    Thanks!

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

  2. pamelaz22us
    Member
    Posted 1 year ago #

    Ditto that problem here.

    Looks to be the html associated with the time line entry showing in the post? Possibly I did something wrong in the setup of open graph?

    See it here:
    https://www.facebook.com/Torchbabe

    Any plans for a fix on this?

    Also, secondary issue, the photo from my Etsy sidebar widget is showing up in my facebook post. Not a huge problem for me but it does seem rather random.

    Thanks!

  3. pamelaz22us
    Member
    Posted 1 year ago #

    Testing this more and it seems what I am getting on the FB page isn't the time line entry but a duplicate of the what I put in the content box but with mark-up.

    https://www.facebook.com/Torchbabe

    So my fb page entry looks like this:

    <p> Test 4 post content. </p>

    Test 4 post content.

    Also, I am getting an entry on my personal FB account time line, even though 'The post to author's timeline box is not checked'.

    Doesn't appear I can edit the post to FB either to get rid of the markup junk.

    Can somebody fix this? I can opt out on some of the fancier features but the duplication is a deal breaker :-(

    Thanks for any fix offered.

  4. jaytarbox
    Member
    Posted 1 year ago #

    I'm seeing the same thing happen at the top of posts to Facebook.
    for example:

    &Nbsp; As I prepare for

    There is space at the top of the post, hence the &Nbsp that does exist in the code. But it shouldn't be showing up in Facebook.

  5. Ray Monohan
    Member
    Posted 1 year ago #

    Bump. Happening to me to on http://www.facebook.com/northwestsportsbeat

  6. Akhil R S
    Member
    Posted 1 year ago #

    I do had the same issue, As a quick solution i used the fb_strip_and_format_desc() function to trim the html characters.

    https://www.facebook.com/keralathanima

    Edit fb-social-publisher.php file goto line 232, use fb_strip_and_format_desc() in both name and caption array values like below

    $args = array('access_token' => $fan_page_info[0][3],
            'from' => $fan_page_info[0][2],
            'link' => apply_filters( 'rel_canonical', get_permalink()),
            'picture' => $post_thumbnail_url,
            'name' => fb_strip_and_format_desc(get_the_title()),
            'caption' => fb_strip_and_format_desc(apply_filters( 'the_excerpt', get_the_excerpt() )),
            'description' => fb_strip_and_format_desc( $post ),
            'message' => $fan_page_message,
          );

    Hope this will help to fix the issue.Thanks

  7. J. K.
    Member
    Posted 1 year ago #

    Hi Akhill,
    Thanks for the code, do you paste it in, or replace lines 232-240 with your code?
    Anyway, I tried both but it didn't really change anything, my test turned out like this:

    FB 0 Twitter test 2
    <p>Excuses we moeten nog iets testen voor facebook & twitter

    So the only place where a special character seemed to be displayed correctly is the ampersand at the end...

  8. Akhil R S
    Member
    Posted 1 year ago #

    Hi J.K

    I used the plugin function fb_strip_and_format_desc in name and caption values to clear the html characters, and its working fine for me. You can check my page here : https://www.facebook.com/keralathanima.

    Can you paste the changed code here.

  9. rubious
    Member
    Posted 1 year ago #

    I have this same problem, and tried the same fix but there is one additional problem - characters such as apostrophes an ellipsis are showing up as unicode instead of plain text, so:

    Here's an example

    Shows as:

    Here’s an example

    This looks really bad, is there a fix for this too?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic