fix error

This commit is contained in:
chiu 2021-08-31 12:40:14 +08:00
parent 5f4fe041b2
commit df5d702633
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ def add_css_style_for_block(c,head_key,value_key,css_key)
end
def update_event_news_template(folder)
Dir["#{folder}modules/event_news/*.html.erb"].each do |f|
c = File.open(f,'r'){|f1| f1.read}
c = File.open(f,'r'){|f1| f1.read}.encode("UTF-8", "UTF-8", invalid: :replace, replace: "???")
next if (c.include?("???") rescue true)
flag1,c = add_css_style_for_block(c,'speaker-head','speaker','speaker-css')
flag2,c = add_css_style_for_block(c,'host-head','host','host-css')
if flag1 || flag2