Turn YouTube/Vimeo links into embed addresses in one core filter
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
Research direction
Start with youtubeHelpers.js and safeUrlFilter.js to follow the existing parsing and filter registration patterns, then check renderEngine.js and both Arch widget templates and their update copies. Add the shared filter and tests for accepted hosts, ID shapes, and kept or dropped options; update the named documentation and regenerate the theme skill contract. Done means both widgets use it, the new filter cases pass, and existing videoEmbedWidget.test.js address cases still pass.
Written by the indexing model from the issue text.
Description
Read YouTube/Vimeo links properly in one shared filter (Shorts, unlisted links, bad IDs).
Arch recognises video links in Liquid by substring (contains 'youtube.com/watch', 'vimeo.com/'…) and splits out the ID. Every branch now rebuilds the address on youtube.com/embed/ or player.vimeo.com/video/ and refuses an ID containing ., % or :, so a frame stays on the provider's embed path, but the ID's shape isn't checked (a wrong-length or misspelled ID gives a broken player, not none), the same ~40 lines are duplicated, youtube.com/shorts/ID and vimeo.com/ID/<hash> (unlisted share links) aren't recognised, and youtu.be/watch links drop options like t=. Core already parses YouTube links in extractVideoId (youtubeHelpers.js, used by the youtube setting type and {% youtube %}).
Add a filter, e.g. {{ url | video_embed_url }}: parse with URL, accept exact hosts (youtube.com, www./m.youtube.com, youtu.be, youtube-nocookie.com, vimeo.com, www.vimeo.com, player.vimeo.com), check the ID shape (YouTube 11 of [A-Za-z0-9_-], Vimeo digits), keep only allowed options (start time, Vimeo h), return https://www.youtube.com/embed/ID / https://player.vimeo.com/video/ID or "". Use it in Arch at the URL-parsing block of widgets/video-embed/widget.liquid (feeds the iframe src) and widgets/video-popup/widget.liquid (feeds data-video-url, which video-modal.js opens with autoplay=1), and in their updates/<version>/ copies. No other Arch template parses video links (profile-grid/team-highlight/social-icons only link to YouTube channels through safe_url).
Done when: Both widgets use the filter; filter tests cover each accepted form, a look-alike host, a bad ID and kept/dropped options; the existing videoEmbedWidget.test.js address cases still pass; theming docs, docs-website theme-dev pages and the theme-skill references list it, and the skill contract is regenerated.
Start: youtubeHelpers.js, safeUrlFilter.js (registration pattern), renderEngine.js, video-embed, video-popup, videoEmbedWidget.test.js, build-theme-skill-contract.js. Source: 2026-10-07 review of b9c9fc13.
- Dominant language
- JavaScript
- Stars
- 162
- Forks
- 6
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 2
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tsiger/widgetizer
-
question
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
tsiger/widgetizer#194 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
tsiger/widgetizer#181 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
tsiger/widgetizer#175 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
tsiger/widgetizer#174 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
tsiger/widgetizer#173 ·
All issues in tsiger/widgetizer
Similar issues
-
Link Checker ReportOpenautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
microsoft/playwright#43640 ·
Maintainers usually reply within 1 day
-
✏️ Editing - Tags
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
openfoodfacts/openfoodfacts-server#15127 ·
Maintainers usually reply within 1 day
-
enhancement good first issue hacktoberfest help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Andbal23/dynamic-music-pill#195 ·
Maintainers usually reply within 1 day