Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youtube filter swallows text that comes after a link #29

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

youtube filter swallows text that comes after a link #29

acrispino opened this issue Jan 13, 2012 · 3 comments

Comments

@acrispino
Copy link

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
Copy link
Author

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
Copy link
Contributor

+1

@dejan dejan closed this as completed in 990127a Feb 18, 2012
@dejan
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants