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 (".").
This commit is contained in:
Samuel Georges 2016-02-25 15:01:12 +11:00
parent 9dc1b4d836
commit 40e458d0b0
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}
}