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

Add common case variant of x-ua-compatible in validator #5163

Merged
merged 1 commit into from Sep 27, 2016
Merged

Add common case variant of x-ua-compatible in validator #5163

merged 1 commit into from Sep 27, 2016

Conversation

ghost
Copy link

@ghost ghost commented Sep 22, 2016

No description provided.

@jridgewell
Copy link
Contributor

/to @cramforce, @Gregable

@cramforce
Copy link
Member

LGTM

@ghost
Copy link
Author

ghost commented Sep 27, 2016

For some context, html5-boilerplate has the lowercase version of x-ua-compatible and I am hoping amp will consider it valid: https://github.com/h5bp/html5-boilerplate/blob/master/dist/index.html#L5

@cramforce
Copy link
Member

This should definitely go in!!
@Gregable @powdercloud Is there a better way to make the matching case insensitive?

@powdercloud
Copy link
Contributor

Instead of duplicating the tagspec, you could do value_regex_casei: "^X-UA-Compatible$".
Advantage is it's easier to read; disadvantage is it's less efficient.
We should support value_casei, that'll be best but take a little while to have. So maybe the value_regex_casei is best for now?

@Gregable
Copy link
Member

Chatted with @powdercloud, the regex will solve this problem but cause others. It's a little hard to explain in the comment thread, but it has to do with how we choose which tagspec to use for generating error messages. Changing this to a regexp will cause worse error messages in the case of actual errors.

Let's commit this change for now, and we may be able to improve the matching of tagspecs to error messages later.

@cramforce cramforce merged commit ec6af38 into ampproject:master Sep 27, 2016
samiamorwas pushed a commit to samiamorwas/amphtml that referenced this pull request Sep 28, 2016
* master: (59 commits)
  remove toggleExperiment (ampproject#5192)
  Validator Updates (ampproject#5274)
  Update amp-form docs to document custom validations. (ampproject#5270)
  cron job from @erwinmombay to update size.txt (ampproject#5272)
  Attempt to move execution of gulp tasks into script. (ampproject#5157)
  Require a button instead of a link for better accessibility by default. (ampproject#5255)
  Fix URL Replacements bug (ampproject#5201)
  Remove the no longer used gladeExp param. (ampproject#5119)
  Add common case variant of x-ua-compatible in validator (ampproject#5163)
  Corrected code block rendering (ampproject#5237)
  Bump `amp-slidescroll` 100% on prod. (ampproject#5253)
  version bump / relnotes for amphtml-validator NPM release (ampproject#5252)
  Assert that a node is in DOM before ampdoc can be queried (ampproject#5242)
  Prefix transform in viewer.html to fix example on older iOS devices. (ampproject#5251)
  Support amp-ad for LOKA Research.inc (ampproject#4832)
  <amp-video> Switching from `canplay` to `loadstart` event (ampproject#5228)
  Viewport migrated to ampdoc scope (ampproject#5182)
  AMP and Yandex.Metrica (ampproject#4565)
  Exposing amp-lite in getMode and not autoplaying videos in lite mode (ampproject#5180)
  Check the --format and --html_format command line arguments. (ampproject#5215)
  ...
dreamofabear pushed a commit to dreamofabear/amphtml that referenced this pull request Oct 4, 2016
dreamofabear pushed a commit to dreamofabear/amphtml that referenced this pull request Oct 12, 2016
mityaha pushed a commit to ooyala/amphtml that referenced this pull request Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants