Alternative fix in parser frontend

This commit is contained in:
saurabhbhatia 2013-11-13 13:23:12 +08:00
parent 2e5b3e8ef7
commit 6d5b3a35e9
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ module ParserFrontEnd
ret = '' ret = ''
part = PagePart.find(front['part_id']) if front['part_id'] part = PagePart.find(front['part_id']) if front['part_id']
ret << eval("\"#{front['path']}\"") rescue '' ret << eval("\"#{front['path']}\"") rescue ''
ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") unless args.nil? ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") if args.present?
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>") fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
end end
front.swap(fragment) front.swap(fragment)