class IsoDoc::I18n

def cleanup_entities(text, is_xml: true)

def cleanup_entities(text, is_xml: true)
  if is_xml
    text.split(/([<>])/).each_slice(4).map do |a|
      a[0] = @c.decode(a[0])
      a
    end.join
  else
    @c.decode(text)
  end
end