mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Merge pull request #2476 from cwillisf/fix-extension-url
sanitize extension ID in getExtensionIdForOpcode
This commit is contained in:
commit
a9f473feb6
3 changed files with 10 additions and 2 deletions
|
@ -290,6 +290,9 @@ test('getExtensionIdForOpcode', t => {
|
|||
// does not return anything for opcodes with no extension
|
||||
t.false(sb3.getExtensionIdForOpcode('hello'));
|
||||
|
||||
// forbidden characters must be replaced with '-'
|
||||
t.equal(sb3.getExtensionIdForOpcode('hi:there/happy_people'), 'hi-there-happy');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue