Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i have found a little problem today: if u put video url with a space at the end, it doesnt work.
maybe u can add something like this:
$valid_url = str_replace(" ", "", $raw_url)
to make ir work properly???
thanks.
Comment | File | Size | Author |
---|---|---|---|
#5 | video_embed_field-url-whitespace-trim-1312326-5.patch | 852 bytes | wbobeirne |
Comments
Comment #1
jec006 CreditAttribution: jec006 commentedSure, I can add a trim in there to fix this problem
Comment #2
jec006 CreditAttribution: jec006 commentedI fixed this here: http://drupal.org/commitlog/commit/25834/55bbc308ad9789bc927e39701d79e69...
You can check the project out from git to get the fix now, or wait for the dev version to rebuild.
Comment #3
dgastudio CreditAttribution: dgastudio commentedthank u veru much
Comment #4
mototribe CreditAttribution: mototribe commentedwhen there is a space at the beginning of the video it breaks the video (just shows the link with an invalid internal path).
Hope it's ok to open this old request rather than submitting a new one?
Comment #5
wbobeirne CreditAttribution: wbobeirne commentedPutting the trim in the validate function doesn't actually do anything, as $items are passed by value there. I've added it to hook_field_presave where the change will actually be reflected in what gets saved. Patch attached.
Comment #6
jec006 CreditAttribution: jec006 commentedCommitted here: http://drupal.org/commitlog/commit/25834/d55014e5cb71cb1d42a8ae81af26179...
Thanks