Index: modules/aggregator/aggregator.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.test,v
retrieving revision 1.47
diff -u -F '^f' -r1.47 aggregator.test
--- modules/aggregator/aggregator.test	25 Oct 2010 15:51:21 -0000	1.47
+++ modules/aggregator/aggregator.test	6 Jan 2011 22:06:36 -0000
@@ -267,6 +267,10 @@
     return $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'aggregator') . '/tests/aggregator_test_atom.xml';
   }
 
+  function getHtmlEntitiesSample() {
+    return $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'aggregator') . '/tests/aggregator_test_title_entities.xml';
+  }
+
   function createSampleNodes() {
     $langcode = LANGUAGE_NONE;
     // Post 5 articles.
@@ -855,5 +859,16 @@
     $this->assertLinkByHref('http://example.org/2003/12/13/atom03');
     $this->assertText('Some text.');
   }
+
+  /**
+   * Test a feed that uses HTML entities in item titles.
+   */
+  function testHtmlEntitiesSample() {
+    $feed = $this->createFeed($this->getHtmlEntitiesSample());
+    aggregator_refresh($feed);
+    $this->drupalGet('aggregator/sources/' . $feed->fid);
+    $this->assertResponse(200, t('Feed %name exists.', array('%name' => $feed->title)));
+    $this->assertText("Quote&quot; Amp&amp;");
+  }
 }
 
Index: modules/aggregator/tests/aggregator_test_title_entities.xml
===================================================================
RCS file: modules/aggregator/tests/aggregator_test_title_entities.xml
diff -N modules/aggregator/tests/aggregator_test_title_entities.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/aggregator/tests/aggregator_test_title_entities.xml	6 Jan 2011 22:06:36 -0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="0.91">
+  <channel>
+    <title>Example with Entities</title>
+    <link>http://example.com</link>
+    <description>Example RSS Feed With HTML Entities in Title</description>
+    <language>en-us</language>
+    <item>
+      <title>Quote&quot; Amp&amp;</title>
+      <link>http://example.com/example-turns-one</link>
+      <description>Some text.</description>
+    </item>
+  </channel>
+</rss>
\ No newline at end of file
