Commit a349d8fa8307c5f07d04caf8775d1b34e3b94fbf
1 parent
b49fa908
Exists in
master
and in
29 other branches
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 | 92 | |
93 | 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 | 95 | @tokenized_children = prepare_to_token_input( |
101 | 96 | profile.members.includes(:articles_with_access).find_all{ |m| |
102 | 97 | m.articles_with_access.include?(@article) |
... | ... | @@ -117,6 +112,11 @@ class CmsController < MyProfileController |
117 | 112 | end |
118 | 113 | end |
119 | 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 | 120 | end |
121 | 121 | |
122 | 122 | def new | ... | ... |