Merge pull request #593 from Mowsh/574-soundcloud-regex

Disallow bad Soundcloud directory names
This commit is contained in:
Igor Zhukov 2014-12-01 20:09:29 -08:00
commit 253a5201d5

View File

@ -3317,7 +3317,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
} }
else if (embedUrlMatches = text.match(soundcloudRegex)) { else if (embedUrlMatches = text.match(soundcloudRegex)) {
var badFolders = 'explore,upload,pages,terms-of-use,mobile,jobs,imprint'.split(','); var badFolders = 'explore,upload,pages,terms-of-use,mobile,jobs,imprint'.split(',');
if (badFolders.indexOf(embedUrlMatches[1]) != -1) { if (badFolders.indexOf(embedUrlMatches[1]) == -1) {
return ['soundcloud', embedUrlMatches[0]]; return ['soundcloud', embedUrlMatches[0]];
} }
} }