Merge pull request #2476 from cwillisf/fix-extension-url

sanitize extension ID in getExtensionIdForOpcode
This commit is contained in:
Chris Willis-Ford 2020-07-14 11:47:02 -07:00 committed by GitHub
commit a9f473feb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

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