Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't choke on iframes without a src #3271

Closed
peterbe opened this issue Mar 17, 2021 · 1 comment · Fixed by #3272
Closed

Don't choke on iframes without a src #3271

peterbe opened this issue Mar 17, 2021 · 1 comment · Fixed by #3272
Assignees

Comments

@peterbe
Copy link
Contributor

peterbe commented Mar 17, 2021

Steps to reproduce:

BUILD_FLAW_LEVELS="unsafe_html: warn, *:ignore" yarn build /Users/peterbe/dev/MOZILLA/MDN/translated-content/files/es/learn/html/multimedia_and_embedding/responsive_images/index.html

You get:

Injecting flaws into /Users/peterbe/dev/MOZILLA/MDN/translated-content/files/es/learn/html/multimedia_and_embedding/responsive_images/index.html (/es/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) failed.
TypeError: Cannot read property 'startsWith' of undefined
    at Node.<anonymous> (/Users/peterbe/dev/MOZILLA/MDN/yari/build/flaws.js:135:17)
    at initialize.exports.each (/Users/peterbe/dev/MOZILLA/MDN/yari/node_modules/cheerio/lib/api/traversing.js:562:24)
    at injectUnsafeHTMLFlaws (/Users/peterbe/dev/MOZILLA/MDN/yari/build/flaws.js:129:38)
    at injectFlaws (/Users/peterbe/dev/MOZILLA/MDN/yari/build/flaws.js:58:5)
    at buildDocument (/Users/peterbe/dev/MOZILLA/MDN/yari/build/index.js:368:5)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
    at async buildDocumentInteractive (/Users/peterbe/dev/MOZILLA/MDN/yari/build/cli.js:48:29)
    at async buildDocuments (/Users/peterbe/dev/MOZILLA/MDN/yari/build/cli.js:125:9)
    at async Se._action (/Users/peterbe/dev/MOZILLA/MDN/yari/build/cli.js:300:60)
    at async Se.run (/Users/peterbe/dev/MOZILLA/MDN/yari/node_modules/@caporal/core/dist/index.js:1:27579)

error: Cannot read property 'startsWith' of undefined
@peterbe peterbe self-assigned this Mar 17, 2021
peterbe added a commit to peterbe/yari that referenced this issue Mar 17, 2021
escattone pushed a commit that referenced this issue Mar 17, 2021
peterbe added a commit to peterbe/yari that referenced this issue Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant