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.
This is what I currently get as output for the video field, using JSON:
"video" : "\n \n \n \n \n \n \n \n",
Comments
Comment #1
Alexander Allen CreditAttribution: Alexander Allen commentedCredit goes to dawehner (http://drupal.org/user/99340), who kindly pointed me where to look at in Views to solve this issue.
Initially I'll support returning just the video URL to get this solved. We can then create a separate feature request or task for returning properly escaped embed codes inside JSON and XML. That will involve adding an option to the Video field per se that allows the user in what format he wants the Video returned.
Comment #2
Alexander Allen CreditAttribution: Alexander Allen commentedFixed in commit 18c4ec2: implement hook_views_pre_render to extract the video URL.
- This commit adds support for returning the Video URL only.
- Full (escaped) embed codes could be added in a separate feature request, where we could better discuss the strategy to do that.