allow simple and double quotes in made-with and index links
authorgc <gc>
Sun, 10 Dec 2006 17:06:13 +0000 (17:06 +0000)
committergc <gc>
Sun, 10 Dec 2006 17:06:13 +0000 (17:06 +0000)
bin/booh

index f62ed0f23819dd1d3a8f9a05baff45c4657d5651..5e0bc3250cea75cfc929c59910b876edda67eef1 100755 (executable)
--- a/bin/booh
+++ b/bin/booh
@@ -3145,8 +3145,8 @@ def new_album
         nperrow = nperrows.find { |e| e[:widget].active? }[:value]
         nperpage = nperpage_model.get_value(nperpagecombo.active_iter, 1)
         opt432 = optimize432.active?
-        madewith = madewithentry.text
-        indexlink = indexlinkentry.text
+        madewith = madewithentry.text.gsub('"', '&quot;').gsub('\'', '&#39;')
+        indexlink = indexlinkentry.text.gsub('"', '&quot;').gsub('\'', '&#39;')
     end
     if src_nb_thread
         Thread.kill(src_nb_thread)
@@ -3183,8 +3183,8 @@ def properties
     if limit_sizes
         limit_sizes = limit_sizes.split(/,/)
     end
-    madewith = $xmldoc.root.attributes['made-with']
-    indexlink = $xmldoc.root.attributes['index-link']
+    madewith = $xmldoc.root.attributes['made-with'].gsub('&#39;', '\'')
+    indexlink = $xmldoc.root.attributes['index-link'].gsub('&#39;', '\'')
 
     tooltips = Gtk::Tooltips.new
     frame1 = Gtk::Frame.new(utf8(_("Locations"))).add(tbl = Gtk::Table.new(0, 0, false))
@@ -3325,8 +3325,8 @@ def properties
     save_opt432 = optimize432.active?
     save_nperrow = nperrows.find { |e| e[:widget].active? }[:value]
     save_nperpage = nperpage_model.get_value(nperpagecombo.active_iter, 1)
-    save_madewith = madewithentry.text
-    save_indexlink = indexlinkentry.text
+    save_madewith = madewithentry.text.gsub('"', '&quot;').gsub('\'', '&#39;')
+    save_indexlink = indexlinkentry.text.gsub('"', '&quot;').gsub('\'', '&#39;')
     dialog.destroy
 
     if ok && (save_theme != theme || save_limit_sizes != limit_sizes || save_opt432 != opt432 || save_nperrow != nperrow || save_nperpage != nperpage || save_madewith != madewith || save_indexlink != indexlinkentry)