From d36589e05b2fd53855d9d1420f599edc4095a98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Sat, 24 May 2014 15:27:13 +0200 Subject: [PATCH] Remove hack from exporter I couldn't reproduce what the comment states anymore, so I just removed it. This fixes a minor issue where html wouldn't be escaped in the export. Thanks to A Kai (@sixhundredns) for reporting. --- lib/diaspora/exporter.rb | 5 +---- spec/lib/diaspora/exporter_spec.rb | 31 ++++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/lib/diaspora/exporter.rb b/lib/diaspora/exporter.rb index 46d3fa3f8..80f0814f1 100644 --- a/lib/diaspora/exporter.rb +++ b/lib/diaspora/exporter.rb @@ -83,10 +83,7 @@ module Diaspora } end - # This is a hack. Nokogiri interprets *.to_xml as a string. - # we want to inject document objects, instead. See lines: 25,35,40. - # Solutions? - CGI.unescapeHTML(builder.to_xml.to_s) + builder.to_xml.to_s end end end diff --git a/spec/lib/diaspora/exporter_spec.rb b/spec/lib/diaspora/exporter_spec.rb index f953d80c9..ed74a43d3 100644 --- a/spec/lib/diaspora/exporter_spec.rb +++ b/spec/lib/diaspora/exporter_spec.rb @@ -12,33 +12,50 @@ describe Diaspora::Exporter do @user2 = FactoryGirl.create(:user) @user3 = bob + @user1.person.profile.first_name = "