Browse Source

Trim spaces in POST variables almost in all actions

Vova Tkach 5 years ago
parent
commit
24ad831055
40 changed files with 148 additions and 151 deletions
  1. 1 1
      modules/module_blog_act_delete.go
  2. 7 7
      modules/module_blog_act_modify.go
  3. 1 1
      modules/module_blog_categories_act_delete.go
  4. 4 4
      modules/module_blog_categories_act_modify.go
  5. 1 1
      modules/module_index_act_delete.go
  6. 4 4
      modules/module_index_act_first_user.go
  7. 8 8
      modules/module_index_act_modify.go
  8. 5 5
      modules/module_index_act_mysql_setup.go
  9. 2 2
      modules/module_index_act_signin.go
  10. 4 4
      modules/module_index_act_update_profile.go
  11. 4 4
      modules/module_settings_act_api.go
  12. 1 1
      modules/module_settings_act_general.go
  13. 4 4
      modules/module_settings_act_pagination.go
  14. 13 15
      modules/module_settings_act_shop.go
  15. 5 7
      modules/module_settings_act_smtp.go
  16. 12 12
      modules/module_settings_act_thumbnails.go
  17. 6 6
      modules/module_shop.go
  18. 3 3
      modules/module_shop_act_attach_product_search.go
  19. 2 2
      modules/module_shop_act_attach_product_to.go
  20. 1 1
      modules/module_shop_act_delete.go
  21. 1 1
      modules/module_shop_act_detach.go
  22. 2 2
      modules/module_shop_act_duplicate.go
  23. 1 1
      modules/module_shop_act_get_attribute_values.go
  24. 2 1
      modules/module_shop_act_images_reorder.go
  25. 13 13
      modules/module_shop_act_modify.go
  26. 7 9
      modules/module_shop_act_order.go
  27. 2 2
      modules/module_shop_act_order_set_status.go
  28. 2 2
      modules/module_shop_act_upload_delete.go
  29. 2 2
      modules/module_shop_act_upload_image.go
  30. 1 1
      modules/module_shop_attributes_act_delete.go
  31. 3 3
      modules/module_shop_attributes_act_modify.go
  32. 1 1
      modules/module_shop_categories_act_delete.go
  33. 4 4
      modules/module_shop_categories_act_modify.go
  34. 1 1
      modules/module_shop_currencies_act_delete.go
  35. 5 5
      modules/module_shop_currencies_act_modify.go
  36. 1 1
      modules/module_template_act_edit_theme_file.go
  37. 2 1
      modules/module_template_act_restore_file.go
  38. 2 1
      modules/module_template_act_restore_file_all.go
  39. 1 1
      modules/module_users_act_delete.go
  40. 7 7
      modules/module_users_act_modify.go

+ 1 - 1
modules/module_blog_act_delete.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_BlogDelete() *Action {
 		Mount:     "blog-delete",
 		Mount:     "blog-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 7 - 7
modules/module_blog_act_modify.go

@@ -14,13 +14,13 @@ func (this *Modules) RegisterAction_BlogModify() *Action {
 		Mount:     "blog-modify",
 		Mount:     "blog-modify",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_name := wrap.R.FormValue("name")
-		pf_alias := wrap.R.FormValue("alias")
-		pf_category := wrap.R.FormValue("category")
-		pf_briefly := wrap.R.FormValue("briefly")
-		pf_content := wrap.R.FormValue("content")
-		pf_active := wrap.R.FormValue("active")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_name := utils.Trim(wrap.R.FormValue("name"))
+		pf_alias := utils.Trim(wrap.R.FormValue("alias"))
+		pf_category := utils.Trim(wrap.R.FormValue("category"))
+		pf_briefly := utils.Trim(wrap.R.FormValue("briefly"))
+		pf_content := utils.Trim(wrap.R.FormValue("content"))
+		pf_active := utils.Trim(wrap.R.FormValue("active"))
 
 
 		if pf_active == "" {
 		if pf_active == "" {
 			pf_active = "0"
 			pf_active = "0"

+ 1 - 1
modules/module_blog_categories_act_delete.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_BlogCategoriesDelete() *Action {
 		Mount:     "blog-categories-delete",
 		Mount:     "blog-categories-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) || utils.StrToInt(pf_id) <= 1 {
 		if !utils.IsNumeric(pf_id) || utils.StrToInt(pf_id) <= 1 {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 4 - 4
modules/module_blog_categories_act_modify.go

@@ -169,10 +169,10 @@ func (this *Modules) RegisterAction_BlogCategoriesModify() *Action {
 		Mount:     "blog-categories-modify",
 		Mount:     "blog-categories-modify",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_name := wrap.R.FormValue("name")
-		pf_alias := wrap.R.FormValue("alias")
-		pf_parent := wrap.R.FormValue("parent")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_name := utils.Trim(wrap.R.FormValue("name"))
+		pf_alias := utils.Trim(wrap.R.FormValue("alias"))
+		pf_parent := utils.Trim(wrap.R.FormValue("parent"))
 
 
 		if !utils.IsNumeric(pf_id) || !utils.IsNumeric(pf_parent) {
 		if !utils.IsNumeric(pf_id) || !utils.IsNumeric(pf_parent) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_index_act_delete.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_IndexDelete() *Action {
 		Mount:     "index-delete",
 		Mount:     "index-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 4 - 4
modules/module_index_act_first_user.go

@@ -10,10 +10,10 @@ func (this *Modules) RegisterAction_IndexFirstUser() *Action {
 		WantDB: true,
 		WantDB: true,
 		Mount:  "index-first-user",
 		Mount:  "index-first-user",
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_first_name := wrap.R.FormValue("first_name")
-		pf_last_name := wrap.R.FormValue("last_name")
-		pf_email := wrap.R.FormValue("email")
-		pf_password := wrap.R.FormValue("password")
+		pf_first_name := utils.Trim(wrap.R.FormValue("first_name"))
+		pf_last_name := utils.Trim(wrap.R.FormValue("last_name"))
+		pf_email := utils.Trim(wrap.R.FormValue("email"))
+		pf_password := utils.Trim(wrap.R.FormValue("password"))
 
 
 		if pf_email == "" {
 		if pf_email == "" {
 			wrap.MsgError(`Please specify user email`)
 			wrap.MsgError(`Please specify user email`)

+ 8 - 8
modules/module_index_act_modify.go

@@ -11,14 +11,14 @@ func (this *Modules) RegisterAction_IndexModify() *Action {
 		Mount:     "index-modify",
 		Mount:     "index-modify",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_name := wrap.R.FormValue("name")
-		pf_alias := wrap.R.FormValue("alias")
-		pf_content := wrap.R.FormValue("content")
-		pf_meta_title := wrap.R.FormValue("meta_title")
-		pf_meta_keywords := wrap.R.FormValue("meta_keywords")
-		pf_meta_description := wrap.R.FormValue("meta_description")
-		pf_active := wrap.R.FormValue("active")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_name := utils.Trim(wrap.R.FormValue("name"))
+		pf_alias := utils.Trim(wrap.R.FormValue("alias"))
+		pf_content := utils.Trim(wrap.R.FormValue("content"))
+		pf_meta_title := utils.Trim(wrap.R.FormValue("meta_title"))
+		pf_meta_keywords := utils.Trim(wrap.R.FormValue("meta_keywords"))
+		pf_meta_description := utils.Trim(wrap.R.FormValue("meta_description"))
+		pf_active := utils.Trim(wrap.R.FormValue("active"))
 
 
 		if pf_active == "" {
 		if pf_active == "" {
 			pf_active = "0"
 			pf_active = "0"

+ 5 - 5
modules/module_index_act_mysql_setup.go

@@ -14,11 +14,11 @@ func (this *Modules) RegisterAction_IndexMysqlSetup() *Action {
 		WantDB: false,
 		WantDB: false,
 		Mount:  "index-mysql-setup",
 		Mount:  "index-mysql-setup",
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_host := wrap.R.FormValue("host")
-		pf_port := wrap.R.FormValue("port")
-		pf_name := wrap.R.FormValue("name")
-		pf_user := wrap.R.FormValue("user")
-		pf_password := wrap.R.FormValue("password")
+		pf_host := utils.Trim(wrap.R.FormValue("host"))
+		pf_port := utils.Trim(wrap.R.FormValue("port"))
+		pf_name := utils.Trim(wrap.R.FormValue("name"))
+		pf_user := utils.Trim(wrap.R.FormValue("user"))
+		pf_password := utils.Trim(wrap.R.FormValue("password"))
 
 
 		if pf_host == "" {
 		if pf_host == "" {
 			wrap.MsgError(`Please specify host for MySQL connection`)
 			wrap.MsgError(`Please specify host for MySQL connection`)

+ 2 - 2
modules/module_index_act_signin.go

@@ -11,8 +11,8 @@ func (this *Modules) RegisterAction_IndexUserSignIn() *Action {
 		WantDB: true,
 		WantDB: true,
 		Mount:  "index-user-sign-in",
 		Mount:  "index-user-sign-in",
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_email := wrap.R.FormValue("email")
-		pf_password := wrap.R.FormValue("password")
+		pf_email := utils.Trim(wrap.R.FormValue("email"))
+		pf_password := utils.Trim(wrap.R.FormValue("password"))
 
 
 		if pf_email == "" {
 		if pf_email == "" {
 			wrap.MsgError(`Please specify user email`)
 			wrap.MsgError(`Please specify user email`)

+ 4 - 4
modules/module_index_act_update_profile.go

@@ -11,10 +11,10 @@ func (this *Modules) RegisterAction_IndexUserUpdateProfile() *Action {
 		Mount:    "index-user-update-profile",
 		Mount:    "index-user-update-profile",
 		WantUser: true,
 		WantUser: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_first_name := wrap.R.FormValue("first_name")
-		pf_last_name := wrap.R.FormValue("last_name")
-		pf_email := wrap.R.FormValue("email")
-		pf_password := wrap.R.FormValue("password")
+		pf_first_name := utils.Trim(wrap.R.FormValue("first_name"))
+		pf_last_name := utils.Trim(wrap.R.FormValue("last_name"))
+		pf_email := utils.Trim(wrap.R.FormValue("email"))
+		pf_password := utils.Trim(wrap.R.FormValue("password"))
 
 
 		if pf_email == "" {
 		if pf_email == "" {
 			wrap.MsgError(`Please specify user email`)
 			wrap.MsgError(`Please specify user email`)

+ 4 - 4
modules/module_settings_act_api.go

@@ -11,10 +11,10 @@ func (this *Modules) RegisterAction_SettingsApi() *Action {
 		Mount:     "settings-api",
 		Mount:     "settings-api",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_xml_enabled := wrap.R.FormValue("xml-enabled")
-		pf_xml_name := wrap.R.FormValue("xml-name")
-		pf_xml_company := wrap.R.FormValue("xml-company")
-		pf_xml_url := wrap.R.FormValue("xml-url")
+		pf_xml_enabled := utils.Trim(wrap.R.FormValue("xml-enabled"))
+		pf_xml_name := utils.Trim(wrap.R.FormValue("xml-name"))
+		pf_xml_company := utils.Trim(wrap.R.FormValue("xml-company"))
+		pf_xml_url := utils.Trim(wrap.R.FormValue("xml-url"))
 
 
 		if pf_xml_enabled == "" {
 		if pf_xml_enabled == "" {
 			pf_xml_enabled = "0"
 			pf_xml_enabled = "0"

+ 1 - 1
modules/module_settings_act_general.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_SettingsGeneral() *Action {
 		Mount:     "settings-general",
 		Mount:     "settings-general",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_module_at_home := wrap.R.FormValue("module-at-home")
+		pf_module_at_home := utils.Trim(wrap.R.FormValue("module-at-home"))
 
 
 		if !utils.IsNumeric(pf_module_at_home) {
 		if !utils.IsNumeric(pf_module_at_home) {
 			wrap.MsgError(`Must be integer number`)
 			wrap.MsgError(`Must be integer number`)

+ 4 - 4
modules/module_settings_act_pagination.go

@@ -13,10 +13,10 @@ func (this *Modules) RegisterAction_SettingsPagination() *Action {
 		Mount:     "settings-pagination",
 		Mount:     "settings-pagination",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_blog_index := wrap.R.FormValue("blog-index")
-		pf_blog_category := wrap.R.FormValue("blog-category")
-		pf_shop_index := wrap.R.FormValue("shop-index")
-		pf_shop_category := wrap.R.FormValue("shop-category")
+		pf_blog_index := utils.Trim(wrap.R.FormValue("blog-index"))
+		pf_blog_category := utils.Trim(wrap.R.FormValue("blog-category"))
+		pf_shop_index := utils.Trim(wrap.R.FormValue("shop-index"))
+		pf_shop_category := utils.Trim(wrap.R.FormValue("shop-category"))
 
 
 		if _, err := strconv.Atoi(pf_blog_index); err != nil {
 		if _, err := strconv.Atoi(pf_blog_index); err != nil {
 			wrap.MsgError(`Blog posts count per page on main page must be integer number`)
 			wrap.MsgError(`Blog posts count per page on main page must be integer number`)

+ 13 - 15
modules/module_settings_act_shop.go

@@ -1,8 +1,6 @@
 package modules
 package modules
 
 
 import (
 import (
-	"strings"
-
 	"golang-fave/engine/wrapper"
 	"golang-fave/engine/wrapper"
 	"golang-fave/utils"
 	"golang-fave/utils"
 )
 )
@@ -13,23 +11,23 @@ func (this *Modules) RegisterAction_SettingsShop() *Action {
 		Mount:     "settings-shop",
 		Mount:     "settings-shop",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_price_fomat := wrap.R.FormValue("price-fomat")
-		pf_price_round := wrap.R.FormValue("price-round")
+		pf_price_fomat := utils.Trim(wrap.R.FormValue("price-fomat"))
+		pf_price_round := utils.Trim(wrap.R.FormValue("price-round"))
 
 
-		pf_require_last_name := wrap.R.FormValue("require-last-name")
-		pf_require_first_name := wrap.R.FormValue("require-first-name")
-		pf_require_middle_name := wrap.R.FormValue("require-middle-name")
-		pf_require_mobile_phone := wrap.R.FormValue("require-mobile-phone")
-		pf_require_email_address := wrap.R.FormValue("require-email-address")
-		pf_require_delivery := wrap.R.FormValue("require-delivery")
-		pf_require_comment := wrap.R.FormValue("require-comment")
+		pf_require_last_name := utils.Trim(wrap.R.FormValue("require-last-name"))
+		pf_require_first_name := utils.Trim(wrap.R.FormValue("require-first-name"))
+		pf_require_middle_name := utils.Trim(wrap.R.FormValue("require-middle-name"))
+		pf_require_mobile_phone := utils.Trim(wrap.R.FormValue("require-mobile-phone"))
+		pf_require_email_address := utils.Trim(wrap.R.FormValue("require-email-address"))
+		pf_require_delivery := utils.Trim(wrap.R.FormValue("require-delivery"))
+		pf_require_comment := utils.Trim(wrap.R.FormValue("require-comment"))
 
 
-		pf_new_order_notify_email := strings.TrimSpace(wrap.R.FormValue("new-order-notify-email"))
+		pf_new_order_notify_email := utils.Trim(wrap.R.FormValue("new-order-notify-email"))
 
 
-		pf_new_order_email_theme_cp := strings.TrimSpace(wrap.R.FormValue("new-order-email-theme-cp"))
-		pf_new_order_email_theme_user := strings.TrimSpace(wrap.R.FormValue("new-order-email-theme-user"))
+		pf_new_order_email_theme_cp := utils.Trim(wrap.R.FormValue("new-order-email-theme-cp"))
+		pf_new_order_email_theme_user := utils.Trim(wrap.R.FormValue("new-order-email-theme-user"))
 
 
-		pf_accept_orders := wrap.R.FormValue("accept-orders")
+		pf_accept_orders := utils.Trim(wrap.R.FormValue("accept-orders"))
 
 
 		if !utils.IsNumeric(pf_price_fomat) {
 		if !utils.IsNumeric(pf_price_fomat) {
 			wrap.MsgError(`Must be integer number`)
 			wrap.MsgError(`Must be integer number`)

+ 5 - 7
modules/module_settings_act_smtp.go

@@ -1,8 +1,6 @@
 package modules
 package modules
 
 
 import (
 import (
-	"strings"
-
 	"golang-fave/engine/wrapper"
 	"golang-fave/engine/wrapper"
 	"golang-fave/utils"
 	"golang-fave/utils"
 )
 )
@@ -13,11 +11,11 @@ func (this *Modules) RegisterAction_SettingsSmtp() *Action {
 		Mount:     "settings-smtp",
 		Mount:     "settings-smtp",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_smtp_host := strings.TrimSpace(wrap.R.FormValue("smtp-host"))
-		pf_smtp_port := strings.TrimSpace(wrap.R.FormValue("smtp-port"))
-		pf_smtp_login := strings.TrimSpace(wrap.R.FormValue("smtp-login"))
-		pf_smtp_password := strings.TrimSpace(wrap.R.FormValue("smtp-password"))
-		pf_smtp_test_email := strings.TrimSpace(wrap.R.FormValue("smtp-test-email"))
+		pf_smtp_host := utils.Trim(wrap.R.FormValue("smtp-host"))
+		pf_smtp_port := utils.Trim(wrap.R.FormValue("smtp-port"))
+		pf_smtp_login := utils.Trim(wrap.R.FormValue("smtp-login"))
+		pf_smtp_password := utils.Trim(wrap.R.FormValue("smtp-password"))
+		pf_smtp_test_email := utils.Trim(wrap.R.FormValue("smtp-test-email"))
 
 
 		(*wrap.Config).SMTP.Host = pf_smtp_host
 		(*wrap.Config).SMTP.Host = pf_smtp_host
 		(*wrap.Config).SMTP.Port = utils.StrToInt(pf_smtp_port)
 		(*wrap.Config).SMTP.Port = utils.StrToInt(pf_smtp_port)

+ 12 - 12
modules/module_settings_act_thumbnails.go

@@ -13,21 +13,21 @@ func (this *Modules) RegisterAction_SettingsThumbnails() *Action {
 		Mount:     "settings-thumbnails",
 		Mount:     "settings-thumbnails",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_shop_thumbnail_w_1 := wrap.R.FormValue("shop-thumbnail-w-1")
-		pf_shop_thumbnail_h_1 := wrap.R.FormValue("shop-thumbnail-h-1")
-		pf_shop_thumbnail_r_1 := wrap.R.FormValue("shop-thumbnail-r-1")
+		pf_shop_thumbnail_w_1 := utils.Trim(wrap.R.FormValue("shop-thumbnail-w-1"))
+		pf_shop_thumbnail_h_1 := utils.Trim(wrap.R.FormValue("shop-thumbnail-h-1"))
+		pf_shop_thumbnail_r_1 := utils.Trim(wrap.R.FormValue("shop-thumbnail-r-1"))
 
 
-		pf_shop_thumbnail_w_2 := wrap.R.FormValue("shop-thumbnail-w-2")
-		pf_shop_thumbnail_h_2 := wrap.R.FormValue("shop-thumbnail-h-2")
-		pf_shop_thumbnail_r_2 := wrap.R.FormValue("shop-thumbnail-r-2")
+		pf_shop_thumbnail_w_2 := utils.Trim(wrap.R.FormValue("shop-thumbnail-w-2"))
+		pf_shop_thumbnail_h_2 := utils.Trim(wrap.R.FormValue("shop-thumbnail-h-2"))
+		pf_shop_thumbnail_r_2 := utils.Trim(wrap.R.FormValue("shop-thumbnail-r-2"))
 
 
-		pf_shop_thumbnail_w_3 := wrap.R.FormValue("shop-thumbnail-w-3")
-		pf_shop_thumbnail_h_3 := wrap.R.FormValue("shop-thumbnail-h-3")
-		pf_shop_thumbnail_r_3 := wrap.R.FormValue("shop-thumbnail-r-3")
+		pf_shop_thumbnail_w_3 := utils.Trim(wrap.R.FormValue("shop-thumbnail-w-3"))
+		pf_shop_thumbnail_h_3 := utils.Trim(wrap.R.FormValue("shop-thumbnail-h-3"))
+		pf_shop_thumbnail_r_3 := utils.Trim(wrap.R.FormValue("shop-thumbnail-r-3"))
 
 
-		pf_shop_thumbnail_w_full := wrap.R.FormValue("shop-thumbnail-w-full")
-		pf_shop_thumbnail_h_full := wrap.R.FormValue("shop-thumbnail-h-full")
-		pf_shop_thumbnail_r_full := wrap.R.FormValue("shop-thumbnail-r-full")
+		pf_shop_thumbnail_w_full := utils.Trim(wrap.R.FormValue("shop-thumbnail-w-full"))
+		pf_shop_thumbnail_h_full := utils.Trim(wrap.R.FormValue("shop-thumbnail-h-full"))
+		pf_shop_thumbnail_r_full := utils.Trim(wrap.R.FormValue("shop-thumbnail-r-full"))
 
 
 		if _, err := strconv.Atoi(pf_shop_thumbnail_w_1); err != nil {
 		if _, err := strconv.Atoi(pf_shop_thumbnail_w_1); err != nil {
 			wrap.MsgError(`Must be integer number`)
 			wrap.MsgError(`Must be integer number`)

+ 6 - 6
modules/module_shop.go

@@ -1012,7 +1012,7 @@ func (this *Modules) RegisterModule_Shop() *Module {
 							if middle_name != "" {
 							if middle_name != "" {
 								name += " " + middle_name
 								name += " " + middle_name
 							}
 							}
-							name = `<a href="` + link + `">` + order_id + strings.TrimSpace(name) + `</a>`
+							name = `<a href="` + link + `">` + order_id + utils.Trim(name) + `</a>`
 
 
 							contact := ""
 							contact := ""
 							if email != "" {
 							if email != "" {
@@ -1021,7 +1021,7 @@ func (this *Modules) RegisterModule_Shop() *Module {
 							if phone != "" {
 							if phone != "" {
 								contact += " (" + phone + ")"
 								contact += " (" + phone + ")"
 							}
 							}
-							contact = `<a href="` + link + `">` + strings.TrimSpace(contact) + `</a>`
+							contact = `<a href="` + link + `">` + utils.Trim(contact) + `</a>`
 
 
 							return `<div>` + name + `</div><div><small>` + contact + `</small></div>`
 							return `<div>` + name + `</div><div><small>` + contact + `</small></div>`
 						},
 						},
@@ -1993,7 +1993,7 @@ func (this *Modules) RegisterModule_Shop() *Module {
 			if middle_name != "" {
 			if middle_name != "" {
 				name += " " + middle_name
 				name += " " + middle_name
 			}
 			}
-			name = order_id + strings.TrimSpace(name)
+			name = order_id + utils.Trim(name)
 
 
 			contact := ""
 			contact := ""
 			if email != "" {
 			if email != "" {
@@ -2002,7 +2002,7 @@ func (this *Modules) RegisterModule_Shop() *Module {
 			if phone != "" {
 			if phone != "" {
 				contact += " (" + phone + ")"
 				contact += " (" + phone + ")"
 			}
 			}
-			contact = strings.TrimSpace(contact)
+			contact = utils.Trim(contact)
 
 
 			content += `<table id="cp-table-shop_orders" class="table data-table table-striped table-bordered table-hover table_shop_orders">
 			content += `<table id="cp-table-shop_orders" class="table data-table table-striped table-bordered table-hover table_shop_orders">
 				<thead>
 				<thead>
@@ -2111,7 +2111,7 @@ func (this *Modules) RegisterModule_Shop() *Module {
 				<div class="card-header"><b>Delivery</b></div>
 				<div class="card-header"><b>Delivery</b></div>
 				<ul class="list-group list-group-flush">
 				<ul class="list-group list-group-flush">
 					<li class="list-group-item">`
 					<li class="list-group-item">`
-			if strings.TrimSpace(curr_order_client_delivery_comment) != "" {
+			if utils.Trim(curr_order_client_delivery_comment) != "" {
 				content += html.EscapeString(curr_order_client_delivery_comment)
 				content += html.EscapeString(curr_order_client_delivery_comment)
 			} else {
 			} else {
 				content += `NO SET`
 				content += `NO SET`
@@ -2125,7 +2125,7 @@ func (this *Modules) RegisterModule_Shop() *Module {
 				<div class="card-header"><b>Comment</b></div>
 				<div class="card-header"><b>Comment</b></div>
 				<ul class="list-group list-group-flush">
 				<ul class="list-group list-group-flush">
 					<li class="list-group-item">`
 					<li class="list-group-item">`
-			if strings.TrimSpace(curr_order_client_order_comment) != "" {
+			if utils.Trim(curr_order_client_order_comment) != "" {
 				content += html.EscapeString(curr_order_client_order_comment)
 				content += html.EscapeString(curr_order_client_order_comment)
 			} else {
 			} else {
 				content += `NO SET`
 				content += `NO SET`

+ 3 - 3
modules/module_shop_act_attach_product_search.go

@@ -14,7 +14,7 @@ func (this *Modules) shop_GetProductsListForAttaching(wrap *wrapper.Wrapper, nam
 	words := strings.Split(name, " ")
 	words := strings.Split(name, " ")
 	filtered := []string{}
 	filtered := []string{}
 	for _, value := range words {
 	for _, value := range words {
-		word := strings.TrimSpace(value)
+		word := utils.Trim(value)
 		if word != "" {
 		if word != "" {
 			filtered = append(filtered, "%"+word+"%")
 			filtered = append(filtered, "%"+word+"%")
 		}
 		}
@@ -69,8 +69,8 @@ func (this *Modules) RegisterAction_ShopAttachProductSearch() *Action {
 		Mount:     "shop-attach-product-search",
 		Mount:     "shop-attach-product-search",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_words := wrap.R.FormValue("words")
-		pf_id := wrap.R.FormValue("id")
+		pf_words := utils.Trim(wrap.R.FormValue("words"))
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.Write(`$('#sys-modal-shop-product-attach .products-list').html('<b>Inner system error</b>');`)
 			wrap.Write(`$('#sys-modal-shop-product-attach .products-list').html('<b>Inner system error</b>');`)
 			return
 			return

+ 2 - 2
modules/module_shop_act_attach_product_to.go

@@ -13,8 +13,8 @@ func (this *Modules) RegisterAction_ShopAttachProductTo() *Action {
 		Mount:     "shop-attach-product-to",
 		Mount:     "shop-attach-product-to",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_parent_id := wrap.R.FormValue("parent_id")
-		pf_product_id := wrap.R.FormValue("product_id")
+		pf_parent_id := utils.Trim(wrap.R.FormValue("parent_id"))
+		pf_product_id := utils.Trim(wrap.R.FormValue("product_id"))
 
 
 		if !utils.IsNumeric(pf_parent_id) || !utils.IsNumeric(pf_product_id) {
 		if !utils.IsNumeric(pf_parent_id) || !utils.IsNumeric(pf_product_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_shop_act_delete.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_ShopDelete() *Action {
 		Mount:     "shop-delete",
 		Mount:     "shop-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_shop_act_detach.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_ShopDetach() *Action {
 		Mount:     "shop-detach",
 		Mount:     "shop-detach",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 2 - 2
modules/module_shop_act_duplicate.go

@@ -13,8 +13,8 @@ func (this *Modules) RegisterAction_ShopDuplicate() *Action {
 		Mount:     "shop-duplicate",
 		Mount:     "shop-duplicate",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_attach := wrap.R.FormValue("attach")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_attach := utils.Trim(wrap.R.FormValue("attach"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_shop_act_get_attribute_values.go

@@ -13,7 +13,7 @@ func (this *Modules) RegisterAction_ShopGetAttributeValues() *Action {
 		Mount:     "shop-get-attribute-values",
 		Mount:     "shop-get-attribute-values",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 2 - 1
modules/module_shop_act_images_reorder.go

@@ -4,6 +4,7 @@ import (
 	"encoding/json"
 	"encoding/json"
 
 
 	"golang-fave/engine/wrapper"
 	"golang-fave/engine/wrapper"
+	"golang-fave/utils"
 )
 )
 
 
 type OrderItem struct {
 type OrderItem struct {
@@ -21,7 +22,7 @@ func (this *Modules) RegisterAction_ShopImagesReorder() *Action {
 		Mount:     "shop-images-reorder",
 		Mount:     "shop-images-reorder",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_data := wrap.R.FormValue("data")
+		pf_data := utils.Trim(wrap.R.FormValue("data"))
 
 
 		var orders Orders
 		var orders Orders
 		if err := json.Unmarshal([]byte(pf_data), &orders); err != nil {
 		if err := json.Unmarshal([]byte(pf_data), &orders); err != nil {

+ 13 - 13
modules/module_shop_act_modify.go

@@ -14,19 +14,19 @@ func (this *Modules) RegisterAction_ShopModify() *Action {
 		Mount:     "shop-modify",
 		Mount:     "shop-modify",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_gname := wrap.R.FormValue("gname")
-		pf_name := wrap.R.FormValue("name")
-		pf_price := wrap.R.FormValue("price")
-		pf_price_old := wrap.R.FormValue("price_old")
-		pf_currency := wrap.R.FormValue("currency")
-		pf_alias := wrap.R.FormValue("alias")
-		pf_vendor := wrap.R.FormValue("vendor")
-		pf_quantity := wrap.R.FormValue("quantity")
-		pf_category := wrap.R.FormValue("category")
-		pf_briefly := wrap.R.FormValue("briefly")
-		pf_content := wrap.R.FormValue("content")
-		pf_active := wrap.R.FormValue("active")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_gname := utils.Trim(wrap.R.FormValue("gname"))
+		pf_name := utils.Trim(wrap.R.FormValue("name"))
+		pf_price := utils.Trim(wrap.R.FormValue("price"))
+		pf_price_old := utils.Trim(wrap.R.FormValue("price_old"))
+		pf_currency := utils.Trim(wrap.R.FormValue("currency"))
+		pf_alias := utils.Trim(wrap.R.FormValue("alias"))
+		pf_vendor := utils.Trim(wrap.R.FormValue("vendor"))
+		pf_quantity := utils.Trim(wrap.R.FormValue("quantity"))
+		pf_category := utils.Trim(wrap.R.FormValue("category"))
+		pf_briefly := utils.Trim(wrap.R.FormValue("briefly"))
+		pf_content := utils.Trim(wrap.R.FormValue("content"))
+		pf_active := utils.Trim(wrap.R.FormValue("active"))
 
 
 		if pf_active == "" {
 		if pf_active == "" {
 			pf_active = "0"
 			pf_active = "0"

+ 7 - 9
modules/module_shop_act_order.go

@@ -1,8 +1,6 @@
 package modules
 package modules
 
 
 import (
 import (
-	"strings"
-
 	"golang-fave/consts"
 	"golang-fave/consts"
 	"golang-fave/engine/basket"
 	"golang-fave/engine/basket"
 	"golang-fave/engine/wrapper"
 	"golang-fave/engine/wrapper"
@@ -31,13 +29,13 @@ func (this *Modules) RegisterAction_ShopOrder() *Action {
 			return
 			return
 		}
 		}
 
 
-		pf_client_last_name := strings.TrimSpace(wrap.R.FormValue("client_last_name"))
-		pf_client_first_name := strings.TrimSpace(wrap.R.FormValue("client_first_name"))
-		pf_client_middle_name := strings.TrimSpace(wrap.R.FormValue("client_middle_name"))
-		pf_client_phone := strings.TrimSpace(wrap.R.FormValue("client_phone"))
-		pf_client_email := strings.TrimSpace(wrap.R.FormValue("client_email"))
-		pf_client_delivery_comment := strings.TrimSpace(wrap.R.FormValue("client_delivery_comment"))
-		pf_client_order_comment := strings.TrimSpace(wrap.R.FormValue("client_order_comment"))
+		pf_client_last_name := utils.Trim(wrap.R.FormValue("client_last_name"))
+		pf_client_first_name := utils.Trim(wrap.R.FormValue("client_first_name"))
+		pf_client_middle_name := utils.Trim(wrap.R.FormValue("client_middle_name"))
+		pf_client_phone := utils.Trim(wrap.R.FormValue("client_phone"))
+		pf_client_email := utils.Trim(wrap.R.FormValue("client_email"))
+		pf_client_delivery_comment := utils.Trim(wrap.R.FormValue("client_delivery_comment"))
+		pf_client_order_comment := utils.Trim(wrap.R.FormValue("client_order_comment"))
 
 
 		if (*wrap.Config).Shop.Orders.RequiredFields.LastName != 0 {
 		if (*wrap.Config).Shop.Orders.RequiredFields.LastName != 0 {
 			if pf_client_last_name == "" {
 			if pf_client_last_name == "" {

+ 2 - 2
modules/module_shop_act_order_set_status.go

@@ -11,8 +11,8 @@ func (this *Modules) RegisterAction_ShopOrderSetStatus() *Action {
 		Mount:     "shop-order-set-status",
 		Mount:     "shop-order-set-status",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_status := wrap.R.FormValue("status")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_status := utils.Trim(wrap.R.FormValue("status"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 2 - 2
modules/module_shop_act_upload_delete.go

@@ -13,8 +13,8 @@ func (this *Modules) RegisterAction_ShopUploadDelete() *Action {
 		Mount:     "shop-upload-delete",
 		Mount:     "shop-upload-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_file := wrap.R.FormValue("file")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_file := utils.Trim(wrap.R.FormValue("file"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 2 - 2
modules/module_shop_act_upload_image.go

@@ -22,8 +22,8 @@ func (this *Modules) RegisterAction_ShopUploadImage() *Action {
 		Mount:     "shop-upload-image",
 		Mount:     "shop-upload-image",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_count := wrap.R.FormValue("count")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_count := utils.Trim(wrap.R.FormValue("count"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_shop_attributes_act_delete.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_ShopAttributesDelete() *Action {
 		Mount:     "shop-attributes-delete",
 		Mount:     "shop-attributes-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 3 - 3
modules/module_shop_attributes_act_modify.go

@@ -13,9 +13,9 @@ func (this *Modules) RegisterAction_ShopAttributesModify() *Action {
 		Mount:     "shop-attributes-modify",
 		Mount:     "shop-attributes-modify",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_name := wrap.R.FormValue("name")
-		pf_filter := wrap.R.FormValue("filter")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_name := utils.Trim(wrap.R.FormValue("name"))
+		pf_filter := utils.Trim(wrap.R.FormValue("filter"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_shop_categories_act_delete.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_ShopCategoriesDelete() *Action {
 		Mount:     "shop-categories-delete",
 		Mount:     "shop-categories-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) || utils.StrToInt(pf_id) <= 1 {
 		if !utils.IsNumeric(pf_id) || utils.StrToInt(pf_id) <= 1 {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 4 - 4
modules/module_shop_categories_act_modify.go

@@ -169,10 +169,10 @@ func (this *Modules) RegisterAction_ShopCategoriesModify() *Action {
 		Mount:     "shop-categories-modify",
 		Mount:     "shop-categories-modify",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_name := wrap.R.FormValue("name")
-		pf_alias := wrap.R.FormValue("alias")
-		pf_parent := wrap.R.FormValue("parent")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_name := utils.Trim(wrap.R.FormValue("name"))
+		pf_alias := utils.Trim(wrap.R.FormValue("alias"))
+		pf_parent := utils.Trim(wrap.R.FormValue("parent"))
 
 
 		if !utils.IsNumeric(pf_id) || !utils.IsNumeric(pf_parent) {
 		if !utils.IsNumeric(pf_id) || !utils.IsNumeric(pf_parent) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_shop_currencies_act_delete.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_ShopCurrenciesDelete() *Action {
 		Mount:     "shop-currencies-delete",
 		Mount:     "shop-currencies-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) || utils.StrToInt(pf_id) <= 1 {
 		if !utils.IsNumeric(pf_id) || utils.StrToInt(pf_id) <= 1 {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 5 - 5
modules/module_shop_currencies_act_modify.go

@@ -11,11 +11,11 @@ func (this *Modules) RegisterAction_ShopCurrenciesModify() *Action {
 		Mount:     "shop-currencies-modify",
 		Mount:     "shop-currencies-modify",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_name := wrap.R.FormValue("name")
-		pf_coefficient := wrap.R.FormValue("coefficient")
-		pf_code := wrap.R.FormValue("code")
-		pf_symbol := wrap.R.FormValue("symbol")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_name := utils.Trim(wrap.R.FormValue("name"))
+		pf_coefficient := utils.Trim(wrap.R.FormValue("coefficient"))
+		pf_code := utils.Trim(wrap.R.FormValue("code"))
+		pf_symbol := utils.Trim(wrap.R.FormValue("symbol"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_template_act_edit_theme_file.go

@@ -14,7 +14,7 @@ func (this *Modules) RegisterAction_TemplateEditThemeFile() *Action {
 		Mount:     "template-edit-theme-file",
 		Mount:     "template-edit-theme-file",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_file := wrap.R.FormValue("file")
+		pf_file := utils.Trim(wrap.R.FormValue("file"))
 		pf_content := wrap.R.FormValue("content")
 		pf_content := wrap.R.FormValue("content")
 
 
 		if pf_file == "" {
 		if pf_file == "" {

+ 2 - 1
modules/module_template_act_restore_file.go

@@ -6,6 +6,7 @@ import (
 
 
 	ThemeFiles "golang-fave/assets/template"
 	ThemeFiles "golang-fave/assets/template"
 	"golang-fave/engine/wrapper"
 	"golang-fave/engine/wrapper"
+	"golang-fave/utils"
 )
 )
 
 
 func (this *Modules) RegisterAction_TemplateRestoreFile() *Action {
 func (this *Modules) RegisterAction_TemplateRestoreFile() *Action {
@@ -14,7 +15,7 @@ func (this *Modules) RegisterAction_TemplateRestoreFile() *Action {
 		Mount:     "template-restore-file",
 		Mount:     "template-restore-file",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_file := wrap.R.FormValue("file")
+		pf_file := utils.Trim(wrap.R.FormValue("file"))
 
 
 		if pf_file == "" {
 		if pf_file == "" {
 			wrap.MsgError(`Please specify file name`)
 			wrap.MsgError(`Please specify file name`)

+ 2 - 1
modules/module_template_act_restore_file_all.go

@@ -6,6 +6,7 @@ import (
 
 
 	ThemeFiles "golang-fave/assets/template"
 	ThemeFiles "golang-fave/assets/template"
 	"golang-fave/engine/wrapper"
 	"golang-fave/engine/wrapper"
+	"golang-fave/utils"
 )
 )
 
 
 func (this *Modules) RegisterAction_TemplateRestoreFileAll() *Action {
 func (this *Modules) RegisterAction_TemplateRestoreFileAll() *Action {
@@ -14,7 +15,7 @@ func (this *Modules) RegisterAction_TemplateRestoreFileAll() *Action {
 		Mount:     "template-restore-file-all",
 		Mount:     "template-restore-file-all",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_file := wrap.R.FormValue("file")
+		pf_file := utils.Trim(wrap.R.FormValue("file"))
 
 
 		if pf_file != "all" {
 		if pf_file != "all" {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 1 - 1
modules/module_users_act_delete.go

@@ -11,7 +11,7 @@ func (this *Modules) RegisterAction_UsersDelete() *Action {
 		Mount:     "users-delete",
 		Mount:     "users-delete",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
 
 
 		if !utils.IsNumeric(pf_id) {
 		if !utils.IsNumeric(pf_id) {
 			wrap.MsgError(`Inner system error`)
 			wrap.MsgError(`Inner system error`)

+ 7 - 7
modules/module_users_act_modify.go

@@ -11,13 +11,13 @@ func (this *Modules) RegisterAction_UsersModify() *Action {
 		Mount:     "users-modify",
 		Mount:     "users-modify",
 		WantAdmin: true,
 		WantAdmin: true,
 	}, func(wrap *wrapper.Wrapper) {
 	}, func(wrap *wrapper.Wrapper) {
-		pf_id := wrap.R.FormValue("id")
-		pf_first_name := wrap.R.FormValue("first_name")
-		pf_last_name := wrap.R.FormValue("last_name")
-		pf_email := wrap.R.FormValue("email")
-		pf_password := wrap.R.FormValue("password")
-		pf_admin := wrap.R.FormValue("admin")
-		pf_active := wrap.R.FormValue("active")
+		pf_id := utils.Trim(wrap.R.FormValue("id"))
+		pf_first_name := utils.Trim(wrap.R.FormValue("first_name"))
+		pf_last_name := utils.Trim(wrap.R.FormValue("last_name"))
+		pf_email := utils.Trim(wrap.R.FormValue("email"))
+		pf_password := utils.Trim(wrap.R.FormValue("password"))
+		pf_admin := utils.Trim(wrap.R.FormValue("admin"))
+		pf_active := utils.Trim(wrap.R.FormValue("active"))
 
 
 		if pf_admin == "" {
 		if pf_admin == "" {
 			pf_admin = "0"
 			pf_admin = "0"