Created
March 13, 2020 14:03
-
-
Save ichaykin/1c38712d025eacf940dd6446bebf5c93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/frontend/theme_editor.php b/app/controllers/frontend/theme_editor.php | |
index a5b583c..27d5b2e 100644 | |
--- a/app/controllers/frontend/theme_editor.php | |
+++ b/app/controllers/frontend/theme_editor.php | |
@@ -212,6 +212,10 @@ if ($mode == 'view') { | |
$_REQUEST['style_id'] = $_REQUEST['preset_id']; | |
} | |
+ if (!empty($_REQUEST['name'])) { | |
+ $_REQUEST['name'] = trim($_REQUEST['name']); | |
+ } | |
+ | |
if (!empty($_REQUEST['name']) && Styles::factory($theme->getThemeName())->copy($_REQUEST['style_id'], $_REQUEST['name'])) { | |
fn_theme_editor_set_style($_REQUEST['name']); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/tygh/theme_editor.js b/js/tygh/theme_editor.js | |
index 902307e..99a18d6 100644 | |
--- a/js/tygh/theme_editor.js | |
+++ b/js/tygh/theme_editor.js | |
@@ -244,7 +244,7 @@ | |
return false; | |
} | |
- return style_name; | |
+ return style_name.trim(); | |
} | |
function getEditorUrl(css_filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment