site_validator 1.3.6 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e8adab0890c252808900bd12dc4ae23e556a4ed
|
4
|
+
data.tar.gz: d58c26ff836e00bc03dbf97ebb40eb0e84ce4579
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 987a578afa4b34fe6fb7d64c746cdb8ce9a740ac7700d4839ea30db173d75668fbbaa77744417f4d809bc1662a5616b8333455997baf0328b36dac0d555fc8d8
|
7
|
+
data.tar.gz: ed64907573bd88f536c7ff4eba16e31c6cd4f1b32a0058d120d8d1d18f56325349d5bc7ec70ff255569c263fc4ce6a187b3353e28eb1e5e3490b5016dca215a3
|
data/lib/site_validator/page.rb
CHANGED
@@ -73,12 +73,12 @@ module SiteValidator
|
|
73
73
|
end
|
74
74
|
|
75
75
|
##
|
76
|
-
# Prepares the error message explanation,
|
76
|
+
# Prepares the error message explanation, removing the feedback and adjusting the docs links
|
77
77
|
def prepare_w3c_explanation(message)
|
78
78
|
explanation = message.explanation
|
79
79
|
|
80
80
|
if explanation
|
81
|
-
explanation
|
81
|
+
explanation = remove_feedback_link(explanation)
|
82
82
|
explanation.gsub!("docs/", "http://validator.w3.org/docs/")
|
83
83
|
explanation.gsub!("our feedback channels", "the W3C feedback channels")
|
84
84
|
explanation.strip!
|
@@ -87,5 +87,11 @@ module SiteValidator
|
|
87
87
|
|
88
88
|
explanation
|
89
89
|
end
|
90
|
+
|
91
|
+
def remove_feedback_link(explanation)
|
92
|
+
fragment = Nokogiri::HTML.fragment(explanation)
|
93
|
+
fragment.at_css('p.helpwanted').remove
|
94
|
+
fragment.to_html
|
95
|
+
end
|
90
96
|
end
|
91
97
|
end
|
@@ -89,7 +89,6 @@
|
|
89
89
|
|
90
90
|
/* Explanations */
|
91
91
|
.w3c_explanation { border: 1px solid #ddd; background-color: #ffe; padding: 10px; margin: 5px 5px 25px 5px; font-size: 0.8em; }
|
92
|
-
.helpwanted { float: right; font-size: 2em; }
|
93
92
|
.coordinates { float: right; margin: 10px; background-color: #fff; color: #333; border: 1px solid #aaa;}
|
94
93
|
|
95
94
|
</style>
|