From a349d8fa8307c5f07d04caf8775d1b34e3b94fbf Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Fri, 12 Jun 2015 12:35:37 -0300 Subject: [PATCH] edit-article: move escaped body to fix save and edit feature --- app/controllers/my_profile/cms_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index 0927ef6..46edb6e 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -92,11 +92,6 @@ class CmsController < MyProfileController @article.article_privacy_exceptions = params[:q].split(/,/).map{|n| environment.people.find n.to_i} unless params[:q].nil? - unless @article.kind_of?(RssFeed) - @escaped_body = CGI::escapeHTML(@article.body || '') - @escaped_abstract = CGI::escapeHTML(@article.abstract || '') - end - @tokenized_children = prepare_to_token_input( profile.members.includes(:articles_with_access).find_all{ |m| m.articles_with_access.include?(@article) @@ -117,6 +112,11 @@ class CmsController < MyProfileController end end end + + unless @article.kind_of?(RssFeed) + @escaped_body = CGI::escapeHTML(@article.body || '') + @escaped_abstract = CGI::escapeHTML(@article.abstract || '') + end end def new -- libgit2 0.21.2