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

Mark font server URLs as not intended to work #10645

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions build-system/tasks/check-links.js
Expand Up @@ -129,13 +129,14 @@ function filterWhitelistedLinks(markdown) {

// Direct links to the https://cdn.ampproject.org domain (not a valid page)
filteredMarkdown =
filteredMarkdown.replace(/https:\/\/cdn.ampproject.org(?!\/)/g, '');
filteredMarkdown.replace(/https:\/\/cdn\.ampproject\.org(?!\/)/g, '');

// Links inside a <code> block (illustrative, and not always valid)
filteredMarkdown = filteredMarkdown.replace(/<code>(.*?)<\/code>/g, '');

// Dailymotion link that is marked dead in Travis CI
filteredMarkdown = filteredMarkdown.replace(/https:\/\/developer.dailymotion.com\/player#player-parameters/g, '');
filteredMarkdown = filteredMarkdown.replace(
/https:\/\/developer\.dailymotion\.com\/player#player-parameters/g, '');

// After all whitelisting is done, clean up any remaining empty blocks bounded
// by backticks. Otherwise, `` will be treated as the start of a code block
Expand Down
6 changes: 3 additions & 3 deletions spec/amp-html-format.md
Expand Up @@ -302,9 +302,9 @@ Example:

Font providers can be whitelisted if they support CSS-only integrations and serve over HTTPS. The following origins are currently allowed for font serving via link tags:

- Fonts.com: https://fast.fonts.net
- Google Fonts: https://fonts.googleapis.com
- Font Awesome: https://maxcdn.bootstrapcdn.com
- Fonts.com: `https://fast.fonts.net`
- Google Fonts: `https://fonts.googleapis.com`
- Font Awesome: `https://maxcdn.bootstrapcdn.com`

IMPLEMENTERS NOTE: Adding to this list requires a change to the AMP Cache CSP rule.

Expand Down