w3c_validators 1.2 → 1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.travis.yml +7 -0
  4. data/CHANGELOG +14 -2
  5. data/Gemfile +3 -0
  6. data/Gemfile.lock +43 -0
  7. data/{README.rdoc → README.md} +41 -29
  8. data/Rakefile +64 -0
  9. data/lib/w3c_validators.rb +2 -1
  10. data/lib/w3c_validators/css_validator.rb +23 -16
  11. data/lib/w3c_validators/feed_validator.rb +4 -4
  12. data/lib/w3c_validators/markup_validator.rb +29 -29
  13. data/lib/w3c_validators/message.rb +6 -2
  14. data/lib/w3c_validators/nu_validator.rb +2 -2
  15. data/lib/w3c_validators/validator.rb +48 -43
  16. data/lib/w3c_validators/version.rb +3 -0
  17. data/test/fixtures/bootstrap.min.css +6 -0
  18. data/test/fixtures/invalid_css.css +2 -0
  19. data/test/fixtures/invalid_encoding.html +10 -0
  20. data/test/fixtures/invalid_feed.xml +19 -0
  21. data/test/fixtures/invalid_html5.html +16 -0
  22. data/test/fixtures/invalid_markup.html +11 -0
  23. data/test/fixtures/valid_css.css +2 -0
  24. data/test/fixtures/valid_feed.xml +20 -0
  25. data/test/fixtures/valid_html5.html +16 -0
  26. data/test/fixtures/valid_markup.html +11 -0
  27. data/test/http_recording/css_context.yml +72 -0
  28. data/test/http_recording/css_overriding_css_profile.yml +66 -0
  29. data/test/http_recording/css_skippedstring.yml +72 -0
  30. data/test/http_recording/css_validating_big_file.yml +1423 -0
  31. data/test/http_recording/css_validating_file.yml +72 -0
  32. data/test/http_recording/css_validating_text.yml +66 -0
  33. data/test/http_recording/css_validating_text_via_file.yml +72 -0
  34. data/test/http_recording/css_validating_uri.yml +65 -0
  35. data/test/http_recording/css_vendor_extensions_as_errors.yml +65 -0
  36. data/test/http_recording/css_vendor_extensions_as_warnings.yml +62 -0
  37. data/test/http_recording/css_vendor_extensions_default.yml +62 -0
  38. data/test/http_recording/feed_validating_file.yml +49 -0
  39. data/test/http_recording/feed_validating_text.yml +46 -0
  40. data/test/http_recording/feed_validating_text_via_file.yml +49 -0
  41. data/test/http_recording/feed_validating_uri_with_soap.yml +50 -0
  42. data/test/http_recording/html5_getting_request_data.yml +51 -0
  43. data/test/http_recording/html5_validating_uri.yml +74 -0
  44. data/test/http_recording/markup_debugging_uri.yml +83 -0
  45. data/test/http_recording/markup_overriding_charset.yml +125 -0
  46. data/test/http_recording/markup_overriding_charset_for_fallback_only.yml +76 -0
  47. data/test/http_recording/markup_overriding_doctype.yml +208 -0
  48. data/test/http_recording/markup_overriding_doctype_for_fallback_only.yml +84 -0
  49. data/test/http_recording/markup_validating_file.yml +93 -0
  50. data/test/http_recording/markup_validating_text.yml +67 -0
  51. data/test/http_recording/markup_validating_text_via_file.yml +93 -0
  52. data/test/http_recording/markup_validating_uri_with_head_request.yml +38 -0
  53. data/test/http_recording/markup_validating_uri_with_soap.yml +76 -0
  54. data/test/http_recording/markup_validator_abort.yml +50 -0
  55. data/test/http_recording/markup_validator_contains_details_of_error_conditions.yml +76 -0
  56. data/test/test_css_validator.rb +78 -17
  57. data/test/test_exceptions.rb +11 -8
  58. data/test/test_feed_validator.rb +42 -39
  59. data/test/test_helper.rb +7 -2
  60. data/test/test_html5_validator.rb +42 -34
  61. data/test/test_markup_validator.rb +75 -52
  62. data/test/test_proxy.rb +5 -2
  63. data/w3c_validators.gemspec +24 -0
  64. metadata +154 -68
@@ -0,0 +1,76 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://validator.w3.org/check?output=soap12&uri=https://doc75.github.io/w3c_validators_tests/markup_overriding_charset_for_fallback_only.html
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sun, 30 Oct 2016 17:10:30 GMT
23
+ Server:
24
+ - Apache
25
+ X-W3c-Validator-Recursion:
26
+ - '1'
27
+ X-W3c-Validator-Status:
28
+ - Invalid
29
+ X-W3c-Validator-Errors:
30
+ - '1'
31
+ X-W3c-Validator-Warnings:
32
+ - '0'
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Content-Type:
36
+ - application/soap+xml; charset=UTF-8
37
+ body:
38
+ encoding: UTF-8
39
+ string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
40
+ env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
41
+ \ \n <m:uri>https://doc75.github.io/w3c_validators_tests/markup_overriding_charset_for_fallback_only.html</m:uri>\n
42
+ \ <m:checkedby>https://validator.w3.org/</m:checkedby>\n
43
+ \ <m:doctype>-//W3C//DTD XHTML 1.0 Transitional//EN</m:doctype>\n <m:charset>utf-8</m:charset>\n
44
+ \ <m:validity>false</m:validity>\n <m:errors>\n <m:errorcount>1</m:errorcount>\n
45
+ \ <m:errorlist>\n \n <m:error>\n <m:line>8</m:line>\n
46
+ \ <m:col>12</m:col>\n <m:message>there is no
47
+ attribute &quot;unknown&quot;</m:message>\n <m:messageid>108</m:messageid>\n
48
+ \ <m:explanation> <![CDATA[\n <p class=\"helpwanted\">\n
49
+ \ <a\n href=\"feedback.html?uri=https%3A%2F%2Fdoc75.github.io%2Fw3c_validators_tests%2Fmarkup_overriding_charset_for_fallback_only.html;errmsg_id=108#errormsg\"\n\ttitle=\"Suggest
50
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
51
+ \ </p>\n\n <div class=\"ve mid-108\">\n <p>\n You have used the
52
+ attribute named above in your document, but the\n document type you are
53
+ using does not support that attribute for this\n element. This error
54
+ is often caused by incorrect use of the \"Strict\"\n document type with
55
+ a document that uses frames (e.g. you must use\n the \"Transitional\"
56
+ document type to get the \"target\" attribute), or\n by using vendor
57
+ proprietary extensions such as \"marginheight\" (this\n is usually fixed
58
+ by using CSS to achieve the desired effect instead).\n </p>\n <p>\n
59
+ \ This error may also result if the element itself is not supported in\n
60
+ \ the document type you are using, as an undefined element will have no\n
61
+ \ supported attributes; in this case, see the element-undefined error\n
62
+ \ message for further information.\n </p>\n <p>\n How to fix:
63
+ check the spelling and case of the element and attribute, \n (Remember
64
+ XHTML is all lower-case) and/or \n check that they are both allowed in
65
+ the chosen document type, and/or\n use CSS instead of this attribute.
66
+ If you received this error when using the \n &lt;embed&gt; element to
67
+ incorporate flash media in a Web page, see the \n <a href=\"docs/help.html#faq-flash\">FAQ
68
+ item on valid flash</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
69
+ \ <m:source><![CDATA[&#60;p unknown=<strong title=\"Position
70
+ where error was detected.\">&#34;</strong>true&#34;&#62;Invalid! markup_overriding_charset_for_fallback_only&#60;/p&#62;]]></m:source>\n
71
+ \ </m:error>\n \n </m:errorlist>\n </m:errors>\n
72
+ \ <m:warnings>\n <m:warningcount>0</m:warningcount>\n <m:warninglist>\n
73
+ \ \n \n </m:warninglist>\n </m:warnings>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
74
+ http_version:
75
+ recorded_at: Sun, 30 Oct 2016 17:10:30 GMT
76
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,208 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://validator.w3.org/check?doctype=HTML%203.2&fbd=0&output=soap12&uri=https://doc75.github.io/w3c_validators_tests/invalid_markup.html
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Thu, 27 Oct 2016 19:49:42 GMT
23
+ Server:
24
+ - Apache/2.4.10 (Debian)
25
+ X-W3c-Validator-Recursion:
26
+ - '1'
27
+ X-W3c-Validator-Status:
28
+ - Invalid
29
+ X-W3c-Validator-Errors:
30
+ - '5'
31
+ X-W3c-Validator-Warnings:
32
+ - '3'
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Content-Type:
36
+ - application/soap+xml; charset=UTF-8
37
+ Strict-Transport-Security:
38
+ - max-age=15552015; preload
39
+ Public-Key-Pins:
40
+ - pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
41
+ pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
42
+ X-Frame-Options:
43
+ - deny
44
+ X-Xss-Protection:
45
+ - 1; mode=block
46
+ body:
47
+ encoding: UTF-8
48
+ string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
49
+ env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
50
+ \ \n <m:uri>https://doc75.github.io/w3c_validators_tests/invalid_markup.html</m:uri>\n
51
+ \ <m:checkedby>http://validator.w3.org/</m:checkedby>\n <m:doctype>-//W3C//DTD
52
+ HTML 3.2 Final//EN</m:doctype>\n <m:charset>utf-8</m:charset>\n <m:validity>false</m:validity>\n
53
+ \ <m:warnings>\n <m:warningcount>3</m:warningcount>\n <m:warninglist>\n
54
+ \ \n\n\n\n\n\n\n\n\n\n\n\n\n <m:warning><m:messageid>W11</m:messageid><m:message>Namespace
55
+ Found in non-XML Document</m:message></m:warning>\n\n\n\n <m:warning><m:messageid>W13</m:messageid><m:message>DOCTYPE
56
+ Override in effect!</m:message></m:warning>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
57
+ \ \n <m:warning>\n <m:line>4</m:line>\n <m:col>69</m:col>\n
58
+ \ <m:message>NET-enabling start-tag requires SHORTTAG YES</m:message>\n
59
+ \ <m:messageid>247</m:messageid>\n <m:explanation>
60
+ \ <![CDATA[\n <p class=\"helpwanted\">\n <a\n
61
+ \ href=\"feedback.html?uri=https%3A%2F%2Fdoc75.github.io%2Fw3c_validators_tests%2Finvalid_markup.html;errmsg_id=247#errormsg\"\n\ttitle=\"Suggest
62
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
63
+ \ </p>\n\n <div class=\"ve mid-247\">\n <p>\n For the current
64
+ document, the validator interprets strings like\n <code class=\"inline\">&lt;FOO
65
+ /&gt;</code> according to legacy rules that\n break the expectations
66
+ of most authors and thus cause confusing warnings\n and error messages
67
+ from the validator. This interpretation is triggered\n by HTML 4 documents
68
+ or other SGML-based HTML documents. To avoid the\n messages, simply remove
69
+ the \"/\" character in such contexts. NB: If you\n expect <code class=\"inline\">&lt;FOO
70
+ /&gt;</code> to be interpreted as an\n XML-compatible \"self-closing\"
71
+ tag, then you need to use XHTML or HTML5.\n </p>\n <p>\n This warning
72
+ and related errors may also be caused by an unquoted\n attribute value
73
+ containing one or more \"/\". Example:\n <code class=\"inline\">&lt;a
74
+ href=http://w3c.org&gt;W3C&lt;/a&gt;</code>.\n In such cases, the solution
75
+ is to put quotation marks around the value.\n </p>\n </div>\n\n ]]>\n
76
+ \ </m:explanation>\n <m:source><![CDATA[\t&#60;meta
77
+ http-equiv=&#34;Content-type&#34; content=&#34;text/html; charset=utf-8&#34;
78
+ <strong title=\"Position where error was detected.\">/</strong>&#62;]]></m:source>\n
79
+ \ </m:warning>\n </m:warninglist>\n </m:warnings>\n <m:errors>\n
80
+ \ <m:errorcount>5</m:errorcount>\n <m:errorlist>\n\n <m:error>\n
81
+ \ <m:line>2</m:line>\n <m:col>13</m:col>\n <m:message>there
82
+ is no attribute &quot;XMLNS&quot;</m:message>\n <m:messageid>108</m:messageid>\n
83
+ \ <m:explanation> <![CDATA[\n <p class=\"helpwanted\">\n
84
+ \ <a\n href=\"feedback.html?uri=https%3A%2F%2Fdoc75.github.io%2Fw3c_validators_tests%2Finvalid_markup.html;errmsg_id=108#errormsg\"\n\ttitle=\"Suggest
85
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
86
+ \ </p>\n\n <div class=\"ve mid-108\">\n <p>\n You have used the
87
+ attribute named above in your document, but the\n document type you are
88
+ using does not support that attribute for this\n element. This error
89
+ is often caused by incorrect use of the \"Strict\"\n document type with
90
+ a document that uses frames (e.g. you must use\n the \"Transitional\"
91
+ document type to get the \"target\" attribute), or\n by using vendor
92
+ proprietary extensions such as \"marginheight\" (this\n is usually fixed
93
+ by using CSS to achieve the desired effect instead).\n </p>\n <p>\n
94
+ \ This error may also result if the element itself is not supported in\n
95
+ \ the document type you are using, as an undefined element will have no\n
96
+ \ supported attributes; in this case, see the element-undefined error\n
97
+ \ message for further information.\n </p>\n <p>\n How to fix:
98
+ check the spelling and case of the element and attribute, \n (Remember
99
+ XHTML is all lower-case) and/or \n check that they are both allowed in
100
+ the chosen document type, and/or\n use CSS instead of this attribute.
101
+ If you received this error when using the \n &lt;embed&gt; element to
102
+ incorporate flash media in a Web page, see the \n <a href=\"docs/help.html#faq-flash\">FAQ
103
+ item on valid flash</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
104
+ \ <m:source><![CDATA[&#60;html xmlns=<strong title=\"Position
105
+ where error was detected.\">&#34;</strong>http://www.w3.org/1999/xhtml&#34;
106
+ xml:lang=&#34;en-ca&#34; lang=&#34;en-ca&#34;&#62;]]></m:source>\n </m:error>\n
107
+ \ \n <m:error>\n <m:line>2</m:line>\n <m:col>53</m:col>\n
108
+ \ <m:message>there is no attribute &quot;XML:LANG&quot;</m:message>\n
109
+ \ <m:messageid>108</m:messageid>\n <m:explanation>
110
+ \ <![CDATA[\n <p class=\"helpwanted\">\n <a\n href=\"feedback.html?uri=https%3A%2F%2Fdoc75.github.io%2Fw3c_validators_tests%2Finvalid_markup.html;errmsg_id=108#errormsg\"\n\ttitle=\"Suggest
111
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
112
+ \ </p>\n\n <div class=\"ve mid-108\">\n <p>\n You have used the
113
+ attribute named above in your document, but the\n document type you are
114
+ using does not support that attribute for this\n element. This error
115
+ is often caused by incorrect use of the \"Strict\"\n document type with
116
+ a document that uses frames (e.g. you must use\n the \"Transitional\"
117
+ document type to get the \"target\" attribute), or\n by using vendor
118
+ proprietary extensions such as \"marginheight\" (this\n is usually fixed
119
+ by using CSS to achieve the desired effect instead).\n </p>\n <p>\n
120
+ \ This error may also result if the element itself is not supported in\n
121
+ \ the document type you are using, as an undefined element will have no\n
122
+ \ supported attributes; in this case, see the element-undefined error\n
123
+ \ message for further information.\n </p>\n <p>\n How to fix:
124
+ check the spelling and case of the element and attribute, \n (Remember
125
+ XHTML is all lower-case) and/or \n check that they are both allowed in
126
+ the chosen document type, and/or\n use CSS instead of this attribute.
127
+ If you received this error when using the \n &lt;embed&gt; element to
128
+ incorporate flash media in a Web page, see the \n <a href=\"docs/help.html#faq-flash\">FAQ
129
+ item on valid flash</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
130
+ \ <m:source><![CDATA[&#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;
131
+ xml:lang=<strong title=\"Position where error was detected.\">&#34;</strong>en-ca&#34;
132
+ lang=&#34;en-ca&#34;&#62;]]></m:source>\n </m:error>\n \n
133
+ \ <m:error>\n <m:line>2</m:line>\n <m:col>66</m:col>\n
134
+ \ <m:message>there is no attribute &quot;LANG&quot;</m:message>\n
135
+ \ <m:messageid>108</m:messageid>\n <m:explanation>
136
+ \ <![CDATA[\n <p class=\"helpwanted\">\n <a\n href=\"feedback.html?uri=https%3A%2F%2Fdoc75.github.io%2Fw3c_validators_tests%2Finvalid_markup.html;errmsg_id=108#errormsg\"\n\ttitle=\"Suggest
137
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
138
+ \ </p>\n\n <div class=\"ve mid-108\">\n <p>\n You have used the
139
+ attribute named above in your document, but the\n document type you are
140
+ using does not support that attribute for this\n element. This error
141
+ is often caused by incorrect use of the \"Strict\"\n document type with
142
+ a document that uses frames (e.g. you must use\n the \"Transitional\"
143
+ document type to get the \"target\" attribute), or\n by using vendor
144
+ proprietary extensions such as \"marginheight\" (this\n is usually fixed
145
+ by using CSS to achieve the desired effect instead).\n </p>\n <p>\n
146
+ \ This error may also result if the element itself is not supported in\n
147
+ \ the document type you are using, as an undefined element will have no\n
148
+ \ supported attributes; in this case, see the element-undefined error\n
149
+ \ message for further information.\n </p>\n <p>\n How to fix:
150
+ check the spelling and case of the element and attribute, \n (Remember
151
+ XHTML is all lower-case) and/or \n check that they are both allowed in
152
+ the chosen document type, and/or\n use CSS instead of this attribute.
153
+ If you received this error when using the \n &lt;embed&gt; element to
154
+ incorporate flash media in a Web page, see the \n <a href=\"docs/help.html#faq-flash\">FAQ
155
+ item on valid flash</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
156
+ \ <m:source><![CDATA[&#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;
157
+ xml:lang=&#34;en-ca&#34; lang=<strong title=\"Position where error was detected.\">&#34;</strong>en-ca&#34;&#62;]]></m:source>\n
158
+ \ </m:error>\n \n <m:error>\n <m:line>4</m:line>\n
159
+ \ <m:col>70</m:col>\n <m:message>character data
160
+ is not allowed here</m:message>\n <m:messageid>63</m:messageid>\n
161
+ \ <m:explanation> <![CDATA[\n <p class=\"helpwanted\">\n
162
+ \ <a\n href=\"feedback.html?uri=https%3A%2F%2Fdoc75.github.io%2Fw3c_validators_tests%2Finvalid_markup.html;errmsg_id=63#errormsg\"\n\ttitle=\"Suggest
163
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
164
+ \ </p>\n\n <div class=\"ve mid-63\">\n <p>\n You have used character
165
+ data somewhere it is not permitted to appear.\n Mistakes that can cause
166
+ this error include:\n </p>\n <ul>\n <li>putting text directly in
167
+ the body of the document without wrapping \n it in a container element
168
+ (such as a &lt;p&gt;aragraph&lt;/p&gt;), or</li>\n <li>forgetting to
169
+ quote an attribute value\n (where characters such as \"%\" and \"/\"
170
+ are common, but cannot appear\n without surrounding quotes), or</li>\n
171
+ \ <li>using XHTML-style self-closing tags (such as &lt;meta ... /&gt;)\n
172
+ \ in HTML 4.01 or earlier. To fix, remove the extra slash ('/')\n
173
+ \ character. For more information about the reasons for this, see\n
174
+ \ <a href=\"http://www.cs.tut.fi/~jkorpela/html/empty.html\">Empty\n
175
+ \ elements in SGML, HTML, XML, and XHTML</a>.\n </li>\n </ul>
176
+ \n </div>\n\n ]]>\n </m:explanation>\n <m:source><![CDATA[\t&#60;meta
177
+ http-equiv=&#34;Content-type&#34; content=&#34;text/html; charset=utf-8&#34;
178
+ /<strong title=\"Position where error was detected.\">&#62;</strong>]]></m:source>\n
179
+ \ </m:error>\n \n <m:error>\n <m:line>8</m:line>\n
180
+ \ <m:col>12</m:col>\n <m:message>there is no
181
+ attribute &quot;UNKNOWN&quot;</m:message>\n <m:messageid>108</m:messageid>\n
182
+ \ <m:explanation> <![CDATA[\n <p class=\"helpwanted\">\n
183
+ \ <a\n href=\"feedback.html?uri=https%3A%2F%2Fdoc75.github.io%2Fw3c_validators_tests%2Finvalid_markup.html;errmsg_id=108#errormsg\"\n\ttitle=\"Suggest
184
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
185
+ \ </p>\n\n <div class=\"ve mid-108\">\n <p>\n You have used the
186
+ attribute named above in your document, but the\n document type you are
187
+ using does not support that attribute for this\n element. This error
188
+ is often caused by incorrect use of the \"Strict\"\n document type with
189
+ a document that uses frames (e.g. you must use\n the \"Transitional\"
190
+ document type to get the \"target\" attribute), or\n by using vendor
191
+ proprietary extensions such as \"marginheight\" (this\n is usually fixed
192
+ by using CSS to achieve the desired effect instead).\n </p>\n <p>\n
193
+ \ This error may also result if the element itself is not supported in\n
194
+ \ the document type you are using, as an undefined element will have no\n
195
+ \ supported attributes; in this case, see the element-undefined error\n
196
+ \ message for further information.\n </p>\n <p>\n How to fix:
197
+ check the spelling and case of the element and attribute, \n (Remember
198
+ XHTML is all lower-case) and/or \n check that they are both allowed in
199
+ the chosen document type, and/or\n use CSS instead of this attribute.
200
+ If you received this error when using the \n &lt;embed&gt; element to
201
+ incorporate flash media in a Web page, see the \n <a href=\"docs/help.html#faq-flash\">FAQ
202
+ item on valid flash</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
203
+ \ <m:source><![CDATA[&#60;p unknown=<strong title=\"Position
204
+ where error was detected.\">&#34;</strong>true&#34;&#62;Invalid!&#60;/p&#62;]]></m:source>\n
205
+ \ </m:error>\n \n </m:errorlist>\n </m:errors>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
206
+ http_version:
207
+ recorded_at: Thu, 27 Oct 2016 19:49:43 GMT
208
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,84 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://validator.w3.org/check?doctype=HTML%203.2&fbd=1&output=soap12&uri=https://doc75.github.io/w3c_validators_tests/invalid_markup_1.html
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Thu, 27 Oct 2016 19:49:12 GMT
23
+ Server:
24
+ - Apache/2.4.10 (Debian)
25
+ X-W3c-Validator-Recursion:
26
+ - '1'
27
+ X-W3c-Validator-Status:
28
+ - Invalid
29
+ X-W3c-Validator-Errors:
30
+ - '1'
31
+ X-W3c-Validator-Warnings:
32
+ - '0'
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Content-Type:
36
+ - application/soap+xml; charset=UTF-8
37
+ Strict-Transport-Security:
38
+ - max-age=15552015; preload
39
+ Public-Key-Pins:
40
+ - pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
41
+ pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
42
+ X-Frame-Options:
43
+ - deny
44
+ X-Xss-Protection:
45
+ - 1; mode=block
46
+ body:
47
+ encoding: UTF-8
48
+ string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
49
+ env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
50
+ \ \n <m:uri>https://doc75.github.io/w3c_validators_tests/invalid_markup_1.html</m:uri>\n
51
+ \ <m:checkedby>http://validator.w3.org/</m:checkedby>\n <m:doctype>-//W3C//DTD
52
+ XHTML 1.0 Transitional//EN</m:doctype>\n <m:charset>utf-8</m:charset>\n
53
+ \ <m:validity>false</m:validity>\n <m:warnings>\n <m:warningcount>0</m:warningcount>\n
54
+ \ <m:warninglist>\n \n </m:warninglist>\n </m:warnings>\n
55
+ \ <m:errors>\n <m:errorcount>1</m:errorcount>\n <m:errorlist>\n\n
56
+ \ <m:error>\n <m:line>8</m:line>\n <m:col>12</m:col>\n
57
+ \ <m:message>there is no attribute &quot;unknown&quot;</m:message>\n
58
+ \ <m:messageid>108</m:messageid>\n <m:explanation>
59
+ \ <![CDATA[\n <p class=\"helpwanted\">\n <a\n href=\"feedback.html?uri=https%3A%2F%2Fdoc75.github.io%2Fw3c_validators_tests%2Finvalid_markup_1.html;errmsg_id=108#errormsg\"\n\ttitle=\"Suggest
60
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
61
+ \ </p>\n\n <div class=\"ve mid-108\">\n <p>\n You have used the
62
+ attribute named above in your document, but the\n document type you are
63
+ using does not support that attribute for this\n element. This error
64
+ is often caused by incorrect use of the \"Strict\"\n document type with
65
+ a document that uses frames (e.g. you must use\n the \"Transitional\"
66
+ document type to get the \"target\" attribute), or\n by using vendor
67
+ proprietary extensions such as \"marginheight\" (this\n is usually fixed
68
+ by using CSS to achieve the desired effect instead).\n </p>\n <p>\n
69
+ \ This error may also result if the element itself is not supported in\n
70
+ \ the document type you are using, as an undefined element will have no\n
71
+ \ supported attributes; in this case, see the element-undefined error\n
72
+ \ message for further information.\n </p>\n <p>\n How to fix:
73
+ check the spelling and case of the element and attribute, \n (Remember
74
+ XHTML is all lower-case) and/or \n check that they are both allowed in
75
+ the chosen document type, and/or\n use CSS instead of this attribute.
76
+ If you received this error when using the \n &lt;embed&gt; element to
77
+ incorporate flash media in a Web page, see the \n <a href=\"docs/help.html#faq-flash\">FAQ
78
+ item on valid flash</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
79
+ \ <m:source><![CDATA[&#60;p unknown=<strong title=\"Position
80
+ where error was detected.\">&#34;</strong>true&#34;&#62;Invalid!&#60;/p&#62;]]></m:source>\n
81
+ \ </m:error>\n \n </m:errorlist>\n </m:errors>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
82
+ http_version:
83
+ recorded_at: Thu, 27 Oct 2016 19:49:13 GMT
84
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,93 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://validator.w3.org/check
6
+ body:
7
+ encoding: UTF-8
8
+ string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
9
+ name=\"output\"\r\n\r\nsoap12\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
10
+ form-data; name=\"uploaded_file\"; filename=\"test/fixtures/invalid_markup.html\"\r\nContent-Type:
11
+ text/html\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
12
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"
13
+ xml:lang=\"en-ca\" lang=\"en-ca\">\n<head>\n\t<meta http-equiv=\"Content-type\"
14
+ content=\"text/html; charset=utf-8\" />\n\t<title>W3C Validators -- Invalid
15
+ Test Page </title>\n</head>\n<body>\n<p unknown=\"true\">Invalid!</p>\n<!--
16
+ 1 error; 0 warnings -->\n</body>\n</html>\n\r\n--349832898984244898448024464570528145--\r\n"
17
+ headers:
18
+ Content-Type:
19
+ - multipart/form-data; boundary=349832898984244898448024464570528145
20
+ Accept-Encoding:
21
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
22
+ Accept:
23
+ - "*/*"
24
+ User-Agent:
25
+ - Ruby
26
+ response:
27
+ status:
28
+ code: 200
29
+ message: OK
30
+ headers:
31
+ Date:
32
+ - Sun, 30 Oct 2016 16:53:47 GMT
33
+ Server:
34
+ - Apache/2.4.10 (Debian)
35
+ X-W3c-Validator-Recursion:
36
+ - '1'
37
+ X-W3c-Validator-Status:
38
+ - Invalid
39
+ X-W3c-Validator-Errors:
40
+ - '1'
41
+ X-W3c-Validator-Warnings:
42
+ - '0'
43
+ Transfer-Encoding:
44
+ - chunked
45
+ Content-Type:
46
+ - application/soap+xml; charset=UTF-8
47
+ Strict-Transport-Security:
48
+ - max-age=15552015; preload
49
+ Public-Key-Pins:
50
+ - pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
51
+ pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
52
+ X-Frame-Options:
53
+ - deny
54
+ X-Xss-Protection:
55
+ - 1; mode=block
56
+ body:
57
+ encoding: UTF-8
58
+ string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
59
+ env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
60
+ \ \n <m:uri>test/fixtures/invalid_markup.html</m:uri>\n <m:checkedby>http://validator.w3.org/</m:checkedby>\n
61
+ \ <m:doctype>-//W3C//DTD XHTML 1.0 Transitional//EN</m:doctype>\n <m:charset>utf-8</m:charset>\n
62
+ \ <m:validity>false</m:validity>\n <m:warnings>\n <m:warningcount>0</m:warningcount>\n
63
+ \ <m:warninglist>\n \n </m:warninglist>\n </m:warnings>\n
64
+ \ <m:errors>\n <m:errorcount>1</m:errorcount>\n <m:errorlist>\n\n
65
+ \ <m:error>\n <m:line>8</m:line>\n <m:col>12</m:col>\n
66
+ \ <m:message>there is no attribute &quot;unknown&quot;</m:message>\n
67
+ \ <m:messageid>108</m:messageid>\n <m:explanation>
68
+ \ <![CDATA[\n <p class=\"helpwanted\">\n <a\n href=\"feedback.html?uri=;errmsg_id=108#errormsg\"\n\ttitle=\"Suggest
69
+ improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
70
+ \ </p>\n\n <div class=\"ve mid-108\">\n <p>\n You have used the
71
+ attribute named above in your document, but the\n document type you are
72
+ using does not support that attribute for this\n element. This error
73
+ is often caused by incorrect use of the \"Strict\"\n document type with
74
+ a document that uses frames (e.g. you must use\n the \"Transitional\"
75
+ document type to get the \"target\" attribute), or\n by using vendor
76
+ proprietary extensions such as \"marginheight\" (this\n is usually fixed
77
+ by using CSS to achieve the desired effect instead).\n </p>\n <p>\n
78
+ \ This error may also result if the element itself is not supported in\n
79
+ \ the document type you are using, as an undefined element will have no\n
80
+ \ supported attributes; in this case, see the element-undefined error\n
81
+ \ message for further information.\n </p>\n <p>\n How to fix:
82
+ check the spelling and case of the element and attribute, \n (Remember
83
+ XHTML is all lower-case) and/or \n check that they are both allowed in
84
+ the chosen document type, and/or\n use CSS instead of this attribute.
85
+ If you received this error when using the \n &lt;embed&gt; element to
86
+ incorporate flash media in a Web page, see the \n <a href=\"docs/help.html#faq-flash\">FAQ
87
+ item on valid flash</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
88
+ \ <m:source><![CDATA[&#60;p unknown=<strong title=\"Position
89
+ where error was detected.\">&#34;</strong>true&#34;&#62;Invalid!&#60;/p&#62;]]></m:source>\n
90
+ \ </m:error>\n \n </m:errorlist>\n </m:errors>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
91
+ http_version:
92
+ recorded_at: Sun, 30 Oct 2016 16:53:47 GMT
93
+ recorded_with: VCR 3.0.3