Commit a349d8fa8307c5f07d04caf8775d1b34e3b94fbf

Authored by Rodrigo Souto
1 parent b49fa908

edit-article: move escaped body to fix save and edit feature

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
app/controllers/my_profile/cms_controller.rb
@@ -92,11 +92,6 @@ class CmsController < MyProfileController @@ -92,11 +92,6 @@ class CmsController < MyProfileController
92 92
93 @article.article_privacy_exceptions = params[:q].split(/,/).map{|n| environment.people.find n.to_i} unless params[:q].nil? 93 @article.article_privacy_exceptions = params[:q].split(/,/).map{|n| environment.people.find n.to_i} unless params[:q].nil?
94 94
95 - unless @article.kind_of?(RssFeed)  
96 - @escaped_body = CGI::escapeHTML(@article.body || '')  
97 - @escaped_abstract = CGI::escapeHTML(@article.abstract || '')  
98 - end  
99 -  
100 @tokenized_children = prepare_to_token_input( 95 @tokenized_children = prepare_to_token_input(
101 profile.members.includes(:articles_with_access).find_all{ |m| 96 profile.members.includes(:articles_with_access).find_all{ |m|
102 m.articles_with_access.include?(@article) 97 m.articles_with_access.include?(@article)
@@ -117,6 +112,11 @@ class CmsController < MyProfileController @@ -117,6 +112,11 @@ class CmsController < MyProfileController
117 end 112 end
118 end 113 end
119 end 114 end
  115 +
  116 + unless @article.kind_of?(RssFeed)
  117 + @escaped_body = CGI::escapeHTML(@article.body || '')
  118 + @escaped_abstract = CGI::escapeHTML(@article.abstract || '')
  119 + end
120 end 120 end
121 121
122 def new 122 def new