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.
The attributes frameborder="0" and allowfullscreen cause the w3c validator to fail, i would like to see both of these attributes being implemented as optional via the UI for those times when HTML validation is required regardless.
I have attached a patch that add some additional options for the two iframe attibutes and only adds them to the markup when asked for.
Comments
Comment #1
Rob Holmes CreditAttribution: Rob Holmes commentedAttaching a patch
Comment #2
7drupel7 CreditAttribution: 7drupel7 commentedYes, please make those attributes optional, my W3C validation did not pass either.
Comment #3
andrew.eatherington@gmail.com CreditAttribution: andrew.eatherington@gmail.com as a volunteer and at Cancer Research UK commentedThe above patch failed and might be out of date. I've refactored and created a new patch against branch 7.x-2.x.
Comment #4
andrew.eatherington@gmail.com CreditAttribution: andrew.eatherington@gmail.com as a volunteer and at Cancer Research UK commentedThis includes additional markup missing from the previous patch.
Comment #5
Rob Holmes CreditAttribution: Rob Holmes commentedThis issue can be solved by the folowing method without the need for a patch.
Then in _EXAMPLE_video_embed_field_handle_youtube simply place a copy of the original handler taking out any options you dont want rendered, the code below has the width and height options removed.
Comment #6
LaravZ CreditAttribution: LaravZ commentedThe same issue persists in Drupal 8, would the fix also work there?
Comment #7
phjou@LaravZ I've fixed it for Drupal 8: #3012260 Configure frameborder and allowfullscreen