From 40e458d0b0329c3f58791b431ead51740ae5346a Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Thu, 25 Feb 2016 15:01:12 +1100 Subject: [PATCH] Colon is a valid character, doesn't mess up themes with underscores Eg: SLIDERWEB.SLIDERWEB_0002_hydrogen-theme -> SLIDERWEB.SLIDERWEB.0002.hydrogen-theme Reference: https://www.w3.org/TR/html401/types.html#type-name ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). --- modules/system/controllers/Updates.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php index b8133dbe7..8e6087e4f 100644 --- a/modules/system/controllers/Updates.php +++ b/modules/system/controllers/Updates.php @@ -892,11 +892,11 @@ class Updates extends Controller // /** - * Encode HTML safe product code. + * Encode HTML safe product code, this is to prevent issues with array_get(). */ protected function encodeCode($code) { - return str_replace('.', '_', $code); + return str_replace('.', ':', $code); } /** @@ -904,6 +904,6 @@ class Updates extends Controller */ protected function decodeCode($code) { - return str_replace('_', '.', $code); + return str_replace(':', '.', $code); } }