lib/zci/import.rb in zci-0.0.2 vs lib/zci/import.rb in zci-0.0.3
- old
+ new
@@ -27,9 +27,13 @@
description: section.description,
}
end
def build_article_xml(article)
+ # remove control chars, unicode codepoints from 0001 to 001A
+ article.title.gsub!(/[\u0001-\u001A]/ , '')
+ article.body.gsub!(/[\u0001-\u001A]/ , '')
+
article_xml = Nokogiri::XML::Builder.new do |xml|
xml.root {
# id - id of the original acticle
# section_id - id of the original section
xml.article(id: article.id, section_id: article.section_id, position: article.position, identifier: 'article', type: 'document') {