canonical-rails 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/canonical_rails/tag_helper.rb +3 -3
- data/lib/canonical-rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9d713cf1449219881ab8fabe93f81aa879503a6
|
4
|
+
data.tar.gz: 3afa9e60c076e347e668cb9818407e0d550982cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 621bacab738957f3db4107c504b19cc120f83684c03ad836fabd6b2d8a58fac2caa079226921a513d28cccf53ed5d84cee3535ec429d04c0b2488faedb3f0349
|
7
|
+
data.tar.gz: 0925ef6e2b063b1db45609694ef60a1ea9d8289f4c06aaf3ad776d100560eec6fa6ee66a27aed8e7e382a07c9c99c467f06e2e2025e5370a192717d0b675a339
|
@@ -18,11 +18,11 @@ module CanonicalRails
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def canonical_href(host=canonical_host)
|
21
|
-
"#{request.protocol}#{host}#{path_without_html_extension}#{trailing_slash_if_needed}#{whitelisted_query_string}"
|
21
|
+
raw "#{request.protocol}#{host}#{path_without_html_extension}#{trailing_slash_if_needed}#{whitelisted_query_string}"
|
22
22
|
end
|
23
23
|
|
24
24
|
def canonical_tag(host=canonical_host)
|
25
|
-
tag(:link, :href =>
|
25
|
+
tag(:link, :href => canonical_href(host), :rel => 'canonical')
|
26
26
|
end
|
27
27
|
|
28
28
|
def whitelisted_params
|
@@ -33,7 +33,7 @@ module CanonicalRails
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def whitelisted_query_string
|
36
|
-
"?#{whitelisted_params.map{ |key, val| "#{key}=#{val}" }.join('&')}" if whitelisted_params.present?
|
36
|
+
"?#{whitelisted_params.map{ |key, val| "#{CGI.escape(key)}=#{CGI.escape(val)}" }.join('&')}" if whitelisted_params.present?
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|