Problem/Motivation
A feed title which contain special html characters, such as "&" is displayed as double escaped text. The feed title can be found in the feed-icon.html.twig and in the a link tag in the html head. See screenshots below.

Steps to reproduce
- Create page view with feed.
- Use the "&" character in the feed title.
- Assign the feed to the page.
- Notice the "&" feed title in the rendered feed link and head link.
Proposed resolution
Prevent double escaping.
Remaining tasks
To be determined.
User interface changes
No double escaped special characters.
API changes
To be determined.
Data model changes
To be determined.
Release notes snippet
To be determined.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | views-rss-double-encoded.png | 43.27 KB | cboyden |
| #4 | 3121971-double-escaped-feed-link.png | 12.92 KB | sutharsan |
| screenshot.PNG | 3.5 KB | tobiberlin |
Issue fork drupal-3121971
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tobiberlinComment #4
sutharsan commentedComment #5
sutharsan commentedNeeds a test.
Comment #8
borisson_This issue does not have a patch, so needs review is the wrong status. We should probably get a new test in as well.
Comment #11
mstrelan commentedThis was previously fixed in #1211668: Special characters are encoded twice for feed icon attribute title and we have
\Drupal\Tests\system\Kernel\Common\AddFeedTest::testFeedIconEscapingtesting for it. Is this not working correctly? Does this only affect feeds from views?Comment #13
cboyden commentedThis is still affecting Views RSS displays when they are attached to a page or block.
To reproduce:
Screenshot of term display with incorrectly encoded feed link:
The term name used as the title is being escaped in the core system template modules/system/templates/feed-icon.html.twig:
And it's probably also being escaped by Views.