Posted by scito on July 7, 2011 at 9:49am
10 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | theme system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | needs backport to D7, Novice |
Issue Summary
If a site name is entered that contains an ampersand, then the feed icon's title attribute and alt text displays the encoded version of the ampersand.
Steps to Replicate:
1) Enter site name with ampersand through admin interface, ie 'Cats & Dogs'.
2) Hover over the feed icon on the front page.
Expected Behaviour:
3) Title text displays "Cats & Dogs"
Actual Behaviour:
3) Title text displays "Cats & amp ; Dogs"
The problem: The title text is encoded in function t() with @ parameter and later with drupal_attributes() in functions l()/theme_image().
A former similar issue for taxonomy terms: #973328: Special characters are encoded twice in taxonomy term title
Comments
#1
A patch which passes ! instead of @ to
t().#2
This issue is small and separated.
#3
It looks good, but it needs a reroll for D8.
If you want to help review a similar issue, check out #461938: Core should consistently filter_xss_admin() on $site_slogan and check_plain $site_name .
#4
Rerolled for D8.
#5
Reviewed and tested. The patch in comment #1 applies to D7.
#6
This needz a test so we don't break it again.
#7
I've added a unit test.
#8
The last submitted patch, feed_icon_1211668_7.patch, failed testing.
#9
Strange exception:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupaltestbotmysql.simpletest111894semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => theme_registry:runtime:bartik:cache ) in lock_may_be_available() (line 167 of /var/lib/drupaltestbot/sites/default/files/checkout/core/includes/lock.inc).The test is green on my local machine.
Let's try it again.
#10
#7: feed_icon_1211668_7.patch queued for re-testing.
#11
The last submitted patch, feed_icon_1211668_7.patch, failed testing.
#12
I've converted the tests from DrupalUnitTestCase to DrupalWebTestCase.
theme_feed_icon() could access the DB which causes problem for parallel executions.
Let's try this test.
#13
#12: feed_icon_1211668_12.patch queued for re-testing.
#14
#12: feed_icon_1211668_12.patch queued for re-testing.
#15
The last submitted patch, feed_icon_1211668_12-D7.patch, failed testing.
#16
Updated to reflect change in test case locations
#17
Two people that are working and agreeing on this minor issue should be enough. Setting RTBC.
#18
Committed to 8.x. Moving to 7.x.
#19
Backported to 7.x
#20
I tested #19. The patch corrects the issue for me in 7.x. See the screenshots below.
Before

After

#21
Looks good
#22
Awesome, thanks for the helpful screenshots, and the test!
Committed and pushed to 7.x.
#23
Automatically closed -- issue fixed for 2 weeks with no activity.