#-- encoding: UTF-8 #-- copyright # ChiliProject is a project management system. # # Copyright (C) 2010-2011 the ChiliProject Team # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # See doc/COPYRIGHT.rdoc for more details. #++ module ChiliProject module Liquid module LiquidExt module Context def self.included(base) base.send(:include, InstanceMethods) base.class_eval do alias_method_chain :handle_error, :formatting end end module InstanceMethods def handle_error_with_formatting(e) error = handle_error_without_formatting(e) escaped_error = registers[:view].send(:h, error) rescue CGI::escapeHTML(error) html = '