• Resolved justiin

    (@justiin)


    We noticed alot of random code inside out linkedin posts like &nbsp? Any idea how i filter out the code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @justiin,

    Are you using a page builder? If so, which one?

    Thanks,

    Thread Starter justiin

    (@justiin)

    We use Beaver Builder, but this should not be the issue i guess? We have set a custom post type with no builder attanced to the posts. It should be raw default wordpress text.

    Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @justiin,

    You can put the actual share text in our plugins metabox so this will ensure the message is formatted exactly as you want it.

    Or alternatively you can update the plugin to the latest version and use a filter to remove that encoding in the text. So apply the following code in your themes functions.php file:

    add_filter( 'wp_linkedin_auto_publish_customise_content', function ( $content, $post_id ) {

    // Decode HTML entities
    $content = html_entity_decode( $content, ENT_QUOTES | ENT_HTML5, 'UTF-8' );

    // Replace non-breaking spaces with normal spaces
    $content = str_replace( "\xc2\xa0", ' ', $content );

    return trim( $content );

    }, 10, 2 );

    Hopefully that works!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.