Problem/Motivation

Content-Type response header does not include charset=utf-8 when specifying MIME type as application/rss+xml which leads to special characters being displayed in the RSS feed.

Screenshot of RSS feed with unwanted special characters

Steps to reproduce

Drupal version: 9.2.6
fb_instant_articles version: 8.x-2.x-dev
Browser: Google Chrome Version 94.0.4606.81 (Official Build) (x86_64)

Configure RSS feed according to the module documentation. Load the RSS feed and see that em dashes are being displayed as —.

Proposed resolution

FbInstantArticlesServiceProvider::alter() does not include charset=utf-8 when specifying MIME type as application/rss+xml. Changing line 23 to include charset solves the problem ['application/rss+xml; charset=utf-8'],.

Remaining tasks

Determine what the best approach is to resolve the issue if the proposed resolution does not make sense.

User interface changes

None

API changes

None

Data model changes

fbia_rss format would now be registered as application/rss+xml; charset=utf-8.

Comments

lexfunk created an issue. See original summary.

lexfunk’s picture

Attached is a patch implementing the "Proposed Resolution" from the issue description.