Recognize `data-src` and `data-srcset` attributes even if the URL do not use image extensions

Open
#657 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
web-dev

Research direction

The issue does not name a source file, test, or entry point. Reproduce the supplied markup through the library's normal parsing flow, then verify that YouTube URLs in data-src and data-srcset are recognized without image-file extensions and no longer produce only a thumbnail.

Written by the indexing model from the issue text.

Description

has-website-testcase images reader-mode-has-issues

I'm seeing some markup that contain youtube links....but they don't render. All I get is an image thumbnail for youtube.

<div data-src="https://www.youtube.com/embed/ELoyRfcksP0" data-id="ELoyRfcksP0" data-query="version=3&amp;rel=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;fs=1&amp;hl=en-GB&amp;autohide=2&amp;wmode=transparent"><div data-id="ELoyRfcksP0" data-query="version=3&amp;rel=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;fs=1&amp;hl=en-GB&amp;autohide=2&amp;wmode=transparent" data-src="https://www.youtube.com/embed/ELoyRfcksP0"><p><img src="https://i.ytimg.com/vi/ID/hqdefault.jpg" alt="" width="480" height="360" data-lazy-src="https://i.ytimg.com/vi/ELoyRfcksP0/hqdefault.jpg"></p></div></div>

Is there anyway to render the videos?

Dominant language
JavaScript
Stars
11.5k
Forks
732
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/readability

All issues in mozilla/readability

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.