Index: openacs-4/packages/acs-admin/www/apm/file-watch-cancel.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/file-watch-cancel.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-admin/www/apm/file-watch-cancel.tcl	7 Aug 2017 23:47:45 -0000	1.6
+++ openacs-4/packages/acs-admin/www/apm/file-watch-cancel.tcl	19 Jan 2018 13:40:40 -0000	1.7
@@ -13,6 +13,7 @@
 apm_file_watch_cancel $watch_file
 
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/file-watch.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/file-watch.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/acs-admin/www/apm/file-watch.tcl	7 Aug 2017 23:47:45 -0000	1.13
+++ openacs-4/packages/acs-admin/www/apm/file-watch.tcl	19 Jan 2018 13:40:40 -0000	1.14
@@ -19,6 +19,7 @@
 }
 
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/package-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-add-2.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-admin/www/apm/package-add-2.tcl	22 Dec 2017 13:30:57 -0000	1.14
+++ openacs-4/packages/acs-admin/www/apm/package-add-2.tcl	19 Jan 2018 13:40:40 -0000	1.15
@@ -146,6 +146,7 @@
 }
 
 ad_returnredirect "version-view?version_id=$version_id"
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/package-instance-create.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-instance-create.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-admin/www/apm/package-instance-create.tcl	7 Aug 2017 23:47:45 -0000	1.3
+++ openacs-4/packages/acs-admin/www/apm/package-instance-create.tcl	19 Jan 2018 13:40:40 -0000	1.4
@@ -7,8 +7,10 @@
     {package_key:notnull}
     {return_url:localurl /acs/admin/apm}
 }
+
 apm_package_instance_new -package_key $package_key
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/package-watch-cancel.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-watch-cancel.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-admin/www/apm/package-watch-cancel.tcl	7 Aug 2017 23:47:45 -0000	1.2
+++ openacs-4/packages/acs-admin/www/apm/package-watch-cancel.tcl	19 Jan 2018 13:40:40 -0000	1.3
@@ -11,6 +11,7 @@
 apm_cancel_all_watches $package_key
 
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/package-watch.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-watch.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-admin/www/apm/package-watch.tcl	7 Aug 2017 23:47:45 -0000	1.3
+++ openacs-4/packages/acs-admin/www/apm/package-watch.tcl	19 Jan 2018 13:40:40 -0000	1.4
@@ -12,6 +12,7 @@
 apm_watch_all_files $package_key
 
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/parameter-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/parameter-add-2.tcl,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/acs-admin/www/apm/parameter-add-2.tcl	7 Aug 2017 23:47:45 -0000	1.11
+++ openacs-4/packages/acs-admin/www/apm/parameter-add-2.tcl	19 Jan 2018 13:40:40 -0000	1.12
@@ -60,6 +60,7 @@
 }
 
 ad_returnredirect [export_vars -base "version-parameters" { version_id section_name }]
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/parameter-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/parameter-edit-2.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-admin/www/apm/parameter-edit-2.tcl	7 Aug 2017 23:47:45 -0000	1.8
+++ openacs-4/packages/acs-admin/www/apm/parameter-edit-2.tcl	19 Jan 2018 13:40:40 -0000	1.9
@@ -48,8 +48,8 @@
 }
 
 ad_returnredirect [export_vars -base "version-parameters" { version_id section_name }]
+ad_script_abort
 
-
 # Local variables:
 #    mode: tcl
 #    tcl-indent-level: 4
Index: openacs-4/packages/acs-admin/www/apm/version-callback-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-callback-delete.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-admin/www/apm/version-callback-delete.tcl	7 Aug 2017 23:47:45 -0000	1.3
+++ openacs-4/packages/acs-admin/www/apm/version-callback-delete.tcl	19 Jan 2018 13:40:40 -0000	1.4
@@ -12,6 +12,8 @@
 apm_remove_callback_proc -type $type -package_key $package_key
 
 ad_returnredirect "version-callbacks?version_id=$version_id"
+ad_script_abort
+
 # Local variables:
 #    mode: tcl
 #    tcl-indent-level: 4
Index: openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl	1 Oct 2017 12:16:05 -0000	1.16
+++ openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl	19 Jan 2018 13:40:40 -0000	1.17
@@ -51,6 +51,7 @@
 }
 
 ad_returnredirect [export_vars -base version-dependencies {version_id}]
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl	1 Oct 2017 12:16:05 -0000	1.10
+++ openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl	19 Jan 2018 13:40:40 -0000	1.11
@@ -33,8 +33,8 @@
 }
 
 ad_returnredirect [export_vars -base version-dependencies {version_id}]
+ad_script_abort
 
-
 # Local variables:
 #    mode: tcl
 #    tcl-indent-level: 4
Index: openacs-4/packages/acs-admin/www/apm/version-disable.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-disable.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-admin/www/apm/version-disable.tcl	7 Aug 2017 23:47:45 -0000	1.5
+++ openacs-4/packages/acs-admin/www/apm/version-disable.tcl	19 Jan 2018 13:40:40 -0000	1.6
@@ -10,6 +10,7 @@
 apm_version_disable -callback apm_dummy_callback $version_id
 
 ad_returnredirect "version-view?version_id=$version_id"
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/version-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-edit-2.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-admin/www/apm/version-edit-2.tcl	7 Aug 2017 23:47:45 -0000	1.14
+++ openacs-4/packages/acs-admin/www/apm/version-edit-2.tcl	19 Jan 2018 13:40:40 -0000	1.15
@@ -92,6 +92,7 @@
 }
 
 ad_returnredirect "version-generate-info?version_id=$version_id&write_p=1"
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/version-enable.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-enable.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-admin/www/apm/version-enable.tcl	7 Aug 2017 23:47:45 -0000	1.5
+++ openacs-4/packages/acs-admin/www/apm/version-enable.tcl	19 Jan 2018 13:40:40 -0000	1.6
@@ -13,6 +13,7 @@
 apm_version_enable -callback apm_dummy_callback $version_id
 
 ad_returnredirect "version-view?version_id=$version_id"
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl	7 Aug 2017 23:47:45 -0000	1.6
+++ openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl	19 Jan 2018 13:40:40 -0000	1.7
@@ -21,6 +21,7 @@
 }
 
 ad_returnredirect "version-view?version_id=$version_id"
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/auth/authority-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/authority-delete.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-admin/www/auth/authority-delete.tcl	7 Aug 2017 23:47:45 -0000	1.5
+++ openacs-4/packages/acs-admin/www/auth/authority-delete.tcl	19 Jan 2018 13:40:40 -0000	1.6
@@ -17,6 +17,7 @@
     auth::authority::delete -authority_id $authority_id
 
     ad_returnredirect "."
+    ad_script_abort
 } else {
     ad_return_error "Cannot delete authority" "Deleting this authority would mean that all site-wide administrator users are shut out from the system, meaning the system could no longer be administered."    
 }
Index: openacs-4/packages/acs-admin/www/auth/authority-registration-select.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/authority-registration-select.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-admin/www/auth/authority-registration-select.tcl	7 Aug 2017 23:47:45 -0000	1.4
+++ openacs-4/packages/acs-admin/www/auth/authority-registration-select.tcl	19 Jan 2018 13:40:40 -0000	1.5
@@ -10,12 +10,17 @@
 # Check that the authority has a register implementation
 auth::authority::get -authority_id $authority_id -array authority
 if { $authority(register_impl_id) eq "" } {
-    ad_return_error "No register driver" "The authority $authority(pretty_name) does not have a register driver and cannot register users"
+    ad_return_error "No register driver" \
+        "The authority $authority(pretty_name) does not have a register driver and cannot register users"
 }
 
-parameter::set_value -package_id [apm_package_id_from_key acs-authentication] -parameter RegisterAuthority -value $authority(short_name)
+parameter::set_value \
+    -package_id [apm_package_id_from_key acs-authentication] \
+    -parameter RegisterAuthority -value $authority(short_name)
 
 ad_returnredirect [export_vars -base "." { authority_id }]
+ad_script_abort
+
 # Local variables:
 #    mode: tcl
 #    tcl-indent-level: 4
Index: openacs-4/packages/acs-admin/www/cache/flush-cache.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/cache/flush-cache.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-admin/www/cache/flush-cache.tcl	7 Aug 2017 23:47:45 -0000	1.4
+++ openacs-4/packages/acs-admin/www/cache/flush-cache.tcl	19 Jan 2018 13:40:40 -0000	1.5
@@ -17,6 +17,7 @@
 }
 
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/cache/flush.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/cache/flush.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-admin/www/cache/flush.tcl	7 Aug 2017 23:47:45 -0000	1.4
+++ openacs-4/packages/acs-admin/www/cache/flush.tcl	19 Jan 2018 13:40:40 -0000	1.5
@@ -34,6 +34,7 @@
 ns_cache flush util_memoize $key
 
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/acs-admin/www/users/delete-user.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/delete-user.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-admin/www/users/delete-user.tcl	7 Aug 2017 23:47:45 -0000	1.3
+++ openacs-4/packages/acs-admin/www/users/delete-user.tcl	19 Jan 2018 13:40:40 -0000	1.4
@@ -24,6 +24,8 @@
 }
 
 ad_returnredirect $return_url
+ad_script_abort
+
 # Local variables:
 #    mode: tcl
 #    tcl-indent-level: 4
Index: openacs-4/packages/acs-admin/www/users/merge-final.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/merge-final.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-admin/www/users/merge-final.tcl	7 Aug 2017 23:47:45 -0000	1.7
+++ openacs-4/packages/acs-admin/www/users/merge-final.tcl	19 Jan 2018 13:40:40 -0000	1.8
@@ -31,6 +31,7 @@
 
 if { !$merge_p } {
     ad_returnredirect "/acs-admin/users"
+    ad_script_abort
 } else {
     set final_results [callback merge::MergePackageUser \
                            -from_user_id $from_user_id \
Index: openacs-4/packages/acs-admin/www/users/modify-admin-privileges.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/modify-admin-privileges.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-admin/www/users/modify-admin-privileges.tcl	11 Sep 2017 14:56:16 -0000	1.7
+++ openacs-4/packages/acs-admin/www/users/modify-admin-privileges.tcl	19 Jan 2018 13:40:40 -0000	1.8
@@ -30,6 +30,7 @@
     # We need to flush all permission checks pertaining to this user.
     # this is expensive so maybe we should check if we in fact are cacheing.
     util_memoize_flush_regexp "^permission::.*-party_id $user_id"
+    ad_script_abort
 }
 
 acs_user::get -user_id $user_id -array user_info
Index: openacs-4/packages/acs-admin/www/users/password-reset.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/password-reset.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-admin/www/users/password-reset.tcl	7 Aug 2017 23:47:45 -0000	1.4
+++ openacs-4/packages/acs-admin/www/users/password-reset.tcl	19 Jan 2018 13:40:40 -0000	1.5
@@ -13,9 +13,9 @@
     -username $user_info(username)
 
 ad_returnredirect $return_url
+ad_script_abort
 
 
-
 # Local variables:
 #    mode: tcl
 #    tcl-indent-level: 4
Index: openacs-4/packages/xowiki/tcl/package-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v
diff -u -r1.306 -r1.307
--- openacs-4/packages/xowiki/tcl/package-procs.tcl	3 Jan 2018 18:40:56 -0000	1.306
+++ openacs-4/packages/xowiki/tcl/package-procs.tcl	19 Jan 2018 13:48:24 -0000	1.307
@@ -2060,6 +2060,7 @@
     } else {
       ad_returnredirect $return_url
     }
+    ad_script_abort
   }
 
   #
Index: openacs-4/packages/xowiki/www/admin/bulk-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/bulk-delete.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/xowiki/www/admin/bulk-delete.tcl	7 Aug 2017 23:48:31 -0000	1.4
+++ openacs-4/packages/xowiki/www/admin/bulk-delete.tcl	19 Jan 2018 13:48:24 -0000	1.5
@@ -16,6 +16,7 @@
 }
 
 ad_returnredirect "./list"
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/xowiki/www/admin/delete-type.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/delete-type.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/xowiki/www/admin/delete-type.tcl	7 Aug 2017 23:48:31 -0000	1.14
+++ openacs-4/packages/xowiki/www/admin/delete-type.tcl	19 Jan 2018 13:48:24 -0000	1.15
@@ -22,6 +22,7 @@
 # foreach type [$object_type object_types -subtypes_first true] {$type drop_object_type}
 
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/xowiki/www/admin/set-publish-state.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/set-publish-state.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/xowiki/www/admin/set-publish-state.tcl	7 Aug 2017 23:48:31 -0000	1.13
+++ openacs-4/packages/xowiki/www/admin/set-publish-state.tcl	19 Jan 2018 13:48:24 -0000	1.14
@@ -28,6 +28,7 @@
 }
 
 ad_returnredirect $return_url
+ad_script_abort
 
 # Local variables:
 #    mode: tcl
Index: openacs-4/packages/xowiki/www/ckeditor-images/delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ckeditor-images/delete.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/xowiki/www/ckeditor-images/delete.tcl	7 Aug 2017 23:48:31 -0000	1.4
+++ openacs-4/packages/xowiki/www/ckeditor-images/delete.tcl	19 Jan 2018 13:48:24 -0000	1.5
@@ -6,11 +6,11 @@
 } 
 
 set item_id [content::revision::item_id -revision_id $revision]
+content::item::delete -item_id $item_id
 
- content::item::delete -item_id $item_id
-
-
 ad_returnredirect thumb-view?parent_id=$parent_id
+ad_script_abort
+
 # Local variables:
 #    mode: tcl
 #    tcl-indent-level: 2