Skip to content

Commit

Permalink
Fix the youtube regex to be more flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrove committed Apr 12, 2012
1 parent 7a9a93c commit 6b0da89
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Kandan.Plugins.YouTubeEmbed

@youtube_regex: /^http(s)?:\/\/www.youtube.com\/watch/i
@youtube_regex: /^http(s)?.+www.youtube.com.+watch/i
@youtube_id_regex: /\Wv=([\w|\-]*)/

@youtube_embed_template: _.template '''
Expand All @@ -19,4 +19,4 @@ class Kandan.Plugins.YouTubeEmbed
video_url: message.content,
thumb_url: thumb_url
})
return Kandan.Helpers.Activities.build_from_message_template(message)
return Kandan.Helpers.Activities.build_from_message_template(message)

0 comments on commit 6b0da89

Please sign in to comment.