Skip to content
Snippets Groups Projects
Commit 87fa0736 authored by Alex Barth's avatar Alex Barth
Browse files

Decode HTML entities for title and author name in

  FeedsSimplePieParser.
parent 079da329
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ class FeedsSimplePieParser extends FeedsParser {
*/
public function parse(FeedsImportBatch $batch, FeedsSource $source) {
feeds_include_library('simplepie.inc', 'simplepie');
// Initialize SimplePie.
$parser = new SimplePie();
$parser->set_raw_data($batch->getRaw());
......@@ -53,7 +53,7 @@ class FeedsSimplePieParser extends FeedsParser {
$parser->init();
// Construct the standard form of the parsed feed
$batch->setTitle(($title = $parser->get_title()) ? $title : $this->createTitle($parser->get_description()));
$batch->setTitle(html_entity_decode(($title = $parser->get_title()) ? $title : $this->createTitle($parser->get_description())));
$batch->setDescription($parser->get_description());
$batch->setLink(html_entity_decode($parser->get_link()));
......@@ -61,7 +61,7 @@ class FeedsSimplePieParser extends FeedsParser {
for ($i = 0; $i < $items_num; $i++) {
$item = array();
$simplepie_item = $parser->get_item($i);
$item['title'] = ($title = $simplepie_item->get_title()) ? $title : $this->createTitle($simplepie_item->get_content());
$item['title'] = html_entity_decode(($title = $simplepie_item->get_title()) ? $title : $this->createTitle($simplepie_item->get_content()));
$item['description'] = $simplepie_item->get_content();
$item['url'] = html_entity_decode($simplepie_item->get_link());
// Use UNIX time. If no date is defined, fall back to FEEDS_REQUEST_TIME.
......@@ -75,7 +75,7 @@ class FeedsSimplePieParser extends FeedsParser {
$item['guid'] = $item['url'];
}
$author = $simplepie_item->get_author();
$item['author_name'] = $author->name;
$item['author_name'] = html_entity_decode($author->name);
$item['author_link'] = $author->link;
$item['author_email'] = $author->email;
// Enclosures
......
......@@ -96,7 +96,7 @@ class FeedsRSStoNodesTest extends FeedsWebTestCase {
$this->drupalGet('node');
$this->assertText('Open Atrium Translation Workflow: Two Way Translation Updates');
$this->assertText('Tue, 10/06/2009');
$this->assertText('A new translation process for Open Atrium and integration with Localize Drupal');
$this->assertText('A new translation process for Open Atrium &amp; integration with Localize Drupal');
$this->assertText('Week in DC Tech: October 5th Edition');
$this->assertText('Mon, 10/05/2009');
$this->assertText('There are some great technology events happening this week');
......@@ -118,7 +118,7 @@ class FeedsRSStoNodesTest extends FeedsWebTestCase {
$this->assertText('Week in DC Tech: September 21 Edition');
$this->assertText('Mon, 09/21/2009');
$this->assertText('an interesting variety of technology events happening in Washington, DC ');
$this->assertText('s Software Freedom Day: Impressions and Photos');
$this->assertText('s Software Freedom Day: Impressions &amp; Photos');
$this->assertText('Mon, 09/21/2009');
$this->assertText('Presenting on Features in Drupal and Open Atrium');
$this->assertText('Scaling the Open Atrium UI');
......@@ -237,7 +237,7 @@ class FeedsRSStoNodesTest extends FeedsWebTestCase {
$this->drupalGet('node');
$this->assertText('Open Atrium Translation Workflow: Two Way Translation Updates');
$this->assertText('Tue, 10/06/2009');
$this->assertText('A new translation process for Open Atrium and integration with Localize Drupal');
$this->assertText('A new translation process for Open Atrium &amp; integration with Localize Drupal');
$this->assertText('Week in DC Tech: October 5th Edition');
$this->assertText('Mon, 10/05/2009');
$this->assertText('There are some great technology events happening this week');
......@@ -259,7 +259,7 @@ class FeedsRSStoNodesTest extends FeedsWebTestCase {
$this->assertText('Week in DC Tech: September 21 Edition');
$this->assertText('Mon, 09/21/2009');
$this->assertText('an interesting variety of technology events happening in Washington, DC ');
$this->assertText('s Software Freedom Day: Impressions and Photos');
$this->assertText('s Software Freedom Day: Impressions &amp; Photos');
$this->assertText('Mon, 09/21/2009');
$this->assertText('Presenting on Features in Drupal and Open Atrium');
$this->assertText('Scaling the Open Atrium UI');
......@@ -430,7 +430,7 @@ class FeedsRSStoDataTest extends FeedsWebTestCase {
// Assert accuracy of aggregated information.
$this->drupalGet('admin/content/data/view/feeds_data_rss');
$this->assertText('Open Atrium Translation Workflow: Two Way Translation Updates');
$this->assertText('A new translation process for Open Atrium and integration with Localize Drupal');
$this->assertText('A new translation process for Open Atrium &amp; integration with Localize Drupal');
$this->assertText('Week in DC Tech: October 5th Edition');
$this->assertText('There are some great technology events happening this week');
$this->assertText('Mapping Innovation at the World Bank with Open Atrium');
......@@ -445,7 +445,7 @@ class FeedsRSStoDataTest extends FeedsWebTestCase {
$this->assertText('In addition to authentication, the Siteminder system');
$this->assertText('Week in DC Tech: September 21 Edition');
$this->assertText('an interesting variety of technology events happening in Washington, DC ');
$this->assertText('s Software Freedom Day: Impressions and Photos');
$this->assertText('s Software Freedom Day: Impressions &amp; Photos');
$this->assertText('Presenting on Features in Drupal and Open Atrium');
$this->assertText('Scaling the Open Atrium UI');
$this->assertText('The first major change is switching');
......
......@@ -10,7 +10,7 @@
<description>&lt;div class=&quot;field field-type-text field-field-subtitle&quot;&gt;
&lt;div class=&quot;field-items&quot;&gt;
&lt;div class=&quot;field-item odd&quot;&gt;
&lt;p&gt;A new translation process for Open Atrium and integration with Localize Drupal&lt;/p&gt; &lt;/div&gt;
&lt;p&gt;A new translation process for Open Atrium &amp; integration with Localize Drupal&lt;/p&gt; &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#039;node-body&#039;&gt;&lt;p&gt;The &lt;a href=&quot;http://openatrium.com/&quot;&gt;Open Atrium&lt;/a&gt; &lt;a href=&quot;http://developmentseed.org/blog/2009/jul/16/open-atrium-solving-translation-puzzle&quot;&gt;translation infrastructure&lt;/a&gt; (and Drupal translations in general) are progressing quickly. For Open Atrium to be well translated we first need Drupal&#039;s modules to be translated, so I am splitting efforts at the moment between helping with &lt;a href=&quot;http://localize.drupal.org&quot;&gt;Localize Drupal&lt;/a&gt; and improving &lt;a href=&quot;https://translate.openatrium.com&quot;&gt;Open Atrium Translate&lt;/a&gt;. Already, it is much easier to automatically download your language, get updates from a translation server, protect locally translated strings, and scale the translation system so that translation servers can talk to each other.&lt;/p&gt;
......@@ -240,7 +240,7 @@
<guid isPermaLink="false">968 at http://developmentseed.org</guid>
</item>
<item>
<title>Peru&#039;s Software Freedom Day: Impressions and Photos</title>
<title>Peru&#039;s Software Freedom Day: Impressions &amp; Photos</title>
<link>http://developmentseed.org/blog/2009/sep/21/perus-software-freedom-day-impressions-and-photos</link>
<description>&lt;div class=&#039;node-body&#039;&gt;&lt;p&gt;There was a great turn out a &lt;a href=&quot;http://www.sfdperu.org/&quot;&gt;Software Freedom Day&lt;/a&gt; this weekend with 400 people in attendance and a solid 30 presentations. The &lt;a href=&quot;http://developmentseed.org/blog/2009/sep/15/preparing-perus-software-freedom-day-talks-drupal-features-and-open-atrium&quot;&gt;presentations in the Drupal track&lt;/a&gt; were some of the best attended sessions of the day. To get a sense of Drupal&#039;s traction down here, &quot;Drupal&quot; was mentioned in many sessions and conversations throughout the day, and not just by the people working directly with Drupal.&lt;/p&gt;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment