• Resolved Grzegorz.Janoszka

    (@grzegorzjanoszka)


    I have been a happy user of the SEO framework for quite a while (thank you for this plugin!), but I have just noticed that the footer added by this plugin to the RSS channel has encoded HTML tags.

    My feed is at httx :// paleosmak dot pl slash feed
    and you can see there:

    Wpis 4 bia?e proszki, które dodaj? do sa?atki pojawi? si? najpierw na blogu PaleoSMAK.</p>

    I add this text by hooking to the_seo_framework_feed_source_link_text filter:
    add_filter(‘the_seo_framework_feed_source_link_text’,function() {
    return ‘Wpis <a href=”‘.get_permalink().'” etc…

    I don’t know exactly when it changed, but I am sure in the past the feed footer was displayed correctly.

    Any idea how to fix it?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi @grzegorzjanoszka,

    In either 2.7.2 or 2.7.3, the filter has been sanitized. This caused its input to no longer accepts any HTML code for added security.

    The extra sanitation was added during a security check-up. But, I understand that this wasn’t the initial intention for the filter (I remember our conversation).

    Please note that the whole filter already outputs within a hyperlink:

    <p><a href=".." rel="..">__filter_here__</a></p>
    

    This means that your intended output wasn’t valid HTML to begin with, as links may not be within links.

    So to reiterate, what do you want to achieve and what do you suggest? I think what you want to achieve might best be done through WordPress filters.

    First, disable this option, found in the Feed Settings meta box on the SEO Settings page:
    “Add link to source below the feed entry content? [?]”

    Then, add these WordPress Core filters:

    add_filter( 'the_content_feed', 'my_add_extra_feed_content', 999 );
    add_filter( 'the_excerpt_rss', 'my_add_extra_feed_content', 999 );
    function my_add_extra_feed_content( $content ) {
    
    	// Don't forget to add "nofollow". You don't want scrapers to link back.
    	$my_content = '<p>Wpis <a href="' . get_permalink() . '" rel="nofollow">Text</a> etc...</p>';
    
    	return $content . $my_content;
    }
    

    Cheers ??

    Thread Starter Grzegorz.Janoszka

    (@grzegorzjanoszka)

    Awesome support, thank you so much!
    I think I must have missed the sanitization of the filter in the changelog.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @grzegorzjanoszka,

    No problem ??

    I never include (direct) security improvements within the changelogs, because obscurity prevents hackers from digging. When there’s a true and proven security patch, the changelog will tell you about it in a general sense, without giving literal pointers. The WordPress Core team does this too, sometimes.

    Do you know how to remove the rss footer altogether? I do not want my email address in it! Sry it is off topic but i can find nothing even to tell me where it is created from so I cant even find the file to edit what comes out…lol

    any help woul dbe great…thanks

    tom g /givesuccess

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi, @givesuccess,

    If you can’t find a related topic, it’s best to create a new one ??

    Nevertheless, you might wish to trim the RSS output if it contains your email address at the bottom. It’s not fool-proof… but this can be achieved by setting summaries. It’s not fool-proof because if the content is very short, it might still be shown.

    To do so you can either set the “Convert feed entries into excerpts?” option in The SEO Framework feed settings.
    Alternatively, you could go to WordPress’ “Settings -> Reading”, it’s labeled there as “For each article in a feed, show…”, and set that.

    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Encoded HTML in RSS footer’ is closed to new replies.