youtube filter swallows text that comes after a link #29

Closed
acrispino opened this Issue Jan 13, 2012 · 3 comments

Projects

None yet

3 participants

@acrispino

AutoHtml::auto_html('foo http://www.youtube.com/watch?v=fT1ahr81HLw bar'){ youtube(:width => 400, :height => 240)}

=> "foo <iframe width="400" height="240" src="http://www.youtube.com/embed/fT1ahr81HLw\" frameborder="0" allowfullscreen></iframe>"

foo is there, but where is bar?

@acrispino

how about, changing the youtube filter regexp to

/(https?)://(www.)?(youtube\.com\/watch\?v=|youtu\.be\/)([A-Za-z0-9_-]*)(\&\S+)?(.*)/

and appending $6 to the output?

@dgilperez
Contributor

+1

@dejan dejan closed this in 990127a Feb 18, 2012
@dejan
Owner
dejan commented Feb 18, 2012

Fixed in version 1.5.1. Thanks for reporting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment