Skip to content

Commit

Permalink
Merge pull request #83 from kmichal/master
Browse files Browse the repository at this point in the history
Modify regex pattern in DirectVideoLinkModule
  • Loading branch information
khloke committed Feb 15, 2016
2 parents f5488a3 + fe02d7e commit 286a6a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var DirectVideoLinkModule = {
var supportedVideoExtensions = ['avi', 'wmv', 'asf', 'flv', 'mkv', 'mp4', 'webm', 'm4v'];
for (var i = 0; i < supportedVideoExtensions.length; i++) {
var extension = supportedVideoExtensions[i];
var regex = '^.*\.(' + extension + '|' + extension + '\?.+)$';
var regex = '^.*\\.(' + extension + '|' + extension + '\\?.*)$';
if (url.match(regex)) {
return true;
}
Expand All @@ -38,7 +38,7 @@ var DirectAudioLinkModule = {
var supportedVideoExtensions = ['mp3', 'ogg', 'midi', 'wav', 'aiff', 'aac', 'flac', 'ape', 'wma', 'm4a', 'mka'];
for (var i = 0; i < supportedVideoExtensions.length; i++) {
var extension = supportedVideoExtensions[i];
var regex = '^.*\.' + extension + "$";
var regex = '^.*\\.' + extension + "$";
if (url.match(regex)) {
return true;
}
Expand Down

0 comments on commit 286a6a7

Please sign in to comment.