From 3c65fcee68683f32d44ca9c3cab14d248fadea0c Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 5 Mar 2009 23:32:14 +0100 Subject: more entities translated, refined xpath selector --- lib/tasks/development_init.rake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tasks/development_init.rake b/lib/tasks/development_init.rake index d3c8aff..789cdf6 100644 --- a/lib/tasks/development_init.rake +++ b/lib/tasks/development_init.rake @@ -62,7 +62,7 @@ namespace :cccms do desc "Convert Entities to real charactes" task :convert_entities => :environment do |t| Page.all.each do |page| - if page.body + if page.body && page.body != "" puts ">> #{page.id} -- #{page.node.unique_name if page.node}" tmp_body = page.body.dup tmp_body.gsub!(/ä/, "ä") @@ -74,6 +74,13 @@ namespace :cccms do tmp_body.gsub!(/ß/, "ß") tmp_body.gsub!(/ /, " ") tmp_body.gsub!(/–/, "–") + tmp_body.gsub!(/µ/, "µ") + tmp_body.gsub!(/³/, "³") + tmp_body.gsub!(/é/, "é") + tmp_body.gsub!(/§/, "§") + tmp_body.gsub!(/“/, "“") + tmp_body.gsub!(/”/, "”") + tmp_body.gsub!(/„/, "„") page.body = tmp_body page.save end -- cgit v1.3