• Resolved hijak

    (@hijak)


    So I recently changed my template/Theme for my wordpress site, and the discord bot continues to work well (thank you for fixing it) but now it seems to add extra code to the posts on my discord server. Example is below

    https://prntscr.com/k82ir5

    • This topic was modified 6 years, 4 months ago by hijak.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Nico

    (@nicolamustone)

    Automattic Happiness Engineer

    Good finding! I forgot to strip the tags from the excerpt.
    As a temporary fix you can use the following code in functions.php

    add_filter( 'wp_discord_post_post_embed', 'workaround_strip_tags_excerpt' );
    function workaround_strip_tags_excerpt( $embed ) {
        if ( isset( $embed['description'] ) ) {
            $embed['description'] = strip_tags( $embed['description'] );
        }
    
        return $embed;
    }
    Thread Starter hijak

    (@hijak)

    Thanks, that worked.

    Plugin Author Nico

    (@nicolamustone)

    Automattic Happiness Engineer

    I’ll mark this as solved, since I already applied a fix to be released with the next version and the workaround above works until then.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin adding extra code to posts’ is closed to new replies.