diff --git a/config/initializers/monkey_patch_to_xs.rb b/config/initializers/monkey_patch_to_xs.rb new file mode 100644 index 000000000..cae9570f8 --- /dev/null +++ b/config/initializers/monkey_patch_to_xs.rb @@ -0,0 +1,12 @@ +#see https://github.com/hpricot/hpricot/issues/53 +if RUBY_VERSION < "1.9" + module Builder + class XmlBase + unless ::String.method_defined?(:encode) + def _escape(text) + text.to_xs + end + end + end + end +end \ No newline at end of file diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 9c8f52500..160d7269a 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -53,7 +53,7 @@ describe UsersController do p.save end get :public, :username => @user.username, :format => :atom - response.body.should include('<a href="http://diasporaproject.org/">http://diasporaproject.org/</a>') + response.body.should include('a href') end it 'redirects to a profile page if html is requested' do