You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amber injects its link attributes in RSS feeds. This isn't ideal since RSS feeds can't use this information. It would be better to disable this attribute injection for RSS feeds.
The text was updated successfully, but these errors were encountered:
carlalexander
added a commit
to carlalexander/amber_wordpress
that referenced
this issue
Feb 7, 2018
Extra context: This was breaking our Varnish cache, which choked on RSS feeds which had long articles with many links because having all the Amber HTML inserted effectively doubles the length of such posts.
While we're also working to fix our Varnish to be able to handle extra-long content, it's nonetheless a big problem to have all this extra HTML which won't have any effect in RSS contexts. It increases the size of content which is likely to affect many different services that store the resulting HTML.
Thank you for considering fixing this. For anyone else who wants a fix, it is easily fixable using the filter we added in #48 with the following code:
/**
* Disables Amber's URL lookup by returning an empty string for the URL.
*
* @param string $url
*
* @return string
*/
function gv_amber_disable_url_lookup($url) {
if (is_feed())
$url = '';
return $url;
}
add_filter('amber_lookup_url', 'gv_amber_disable_url_lookup');
Amber injects its link attributes in RSS feeds. This isn't ideal since RSS feeds can't use this information. It would be better to disable this attribute injection for RSS feeds.
The text was updated successfully, but these errors were encountered: