This project has moved. For the latest updates, please go here.
1
Vote

Setting to limit RelativeUrlHtmlFilter to feeds only

description

We would like to enable the RelativeUrlHtmlFilter to ensure relative paths to images and links within blog articles are converted to absolute paths in syndicated content (eg. feed burner and mailchimp rss campaigns).

The catch is we need to limit this filtering to the syndicated feeds only. For the rest of the website the output needs to remain with relative URLS. The reason for this is that we have SSL enabled (for logged in users and certain pages only) and on these pages we get the "there are insecure items referenced on this page" warning when the RelativeUrlHtmlFilter is enabled.

Could we add a setting to this feature to "Only Filter Relative URLs for Feeds" and a check in the ProcessContext method to ensure it only runs when this setting is enabled if the call is via the feed controller?

If not, I will look at implementing a custom IHtmlFilter that only runs for feeds, but I'm just wondering how within this filter I would be able to tell that the call is via the FeedItemBuilder? Is the best approach to get the controller/action from the work context? (i.e., only run check for FeedController/Index)

On a side note, in the ProcessContext method of RelativeUrlHtmlFilter should it be checking that the flavor is "html" before attempting to do anything?

comments