pagy 5.9.2 → 5.9.3

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
  SHA256:
3
- metadata.gz: 24e1c59fc7051792953b7296106a168a84f8fef40e643efd93d4f67da860f5fa
4
- data.tar.gz: a73b79b14a9a86107a52e1f853ebd652dd5516a1dc22891f446e899869868c82
3
+ metadata.gz: 775a7e4b83ac4efbb428fb2790ed87c9b47461d1e5043bd75fd97dd691690c30
4
+ data.tar.gz: d35fa0e7bd99a2d000a0b7751e26038a01c543783011c4adb7ed6521b6fb3c6f
5
5
  SHA512:
6
- metadata.gz: 6e14ba47c6bef80fd8d4b7e87100e395321c5f5be7af11f8567d4895263c2e2cbb509f940a6ef474b070a7b4b1a7cf261ccef707c4e8f254472e72e23503ed4b
7
- data.tar.gz: d12927e5b7cbd5178c057da698d8712deda1a00871e37027700ebbd5741f696094b960c81c877b63e8fecb088bb3f500b2f2c4ddae1cb35964df2346e2cbe38e
6
+ metadata.gz: ef7c6b895f57dfe1051b54198369b5c09ad812471a1af103cfc36bbdf3d506058ca3512372c3ffeb1612485f62cf71586cb5844de14a9acae1451638eca87d52
7
+ data.tar.gz: d353a2d901de3d4accc8dadbe8c35c7d6728ebbf063ba9f2914ea710439b63f04578efd67614989b892294df0e71d67a50f776962a51bd9dfed62240af4ced06
data/lib/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (5.9.2)
3
+ # Pagy initializer file (5.9.3)
4
4
  # Customize only what you really need and notice that the core Pagy works also without any of the following lines.
5
5
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
6
6
 
@@ -82,7 +82,7 @@ window.Pagy = (() => {
82
82
  const trim = (link, param) => link.replace(new RegExp(`(\\?|&)${param}=1\\b(?!&)|\\b${param}=1&`), "");
83
83
  // Public interface
84
84
  return {
85
- version: "5.9.2",
85
+ version: "5.9.3",
86
86
  // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
87
87
  init(arg) {
88
88
  const target = arg instanceof Element ? arg : document;
@@ -111,4 +111,4 @@ window.Pagy = (() => {
111
111
  }
112
112
  };
113
113
  })();
114
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWNBLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxFQUFFO0lBQ2YsNENBQTRDO0lBQzVDLE1BQU0sV0FBVyxHQUFHLElBQUksY0FBYyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQzdDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxVQUFVLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUU3Ryw0QkFBNEI7SUFDNUIsTUFBTSxPQUFPLEdBQUcsQ0FBQyxFQUFhLEVBQUUsQ0FBQyxJQUFJLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBRSxTQUFTLENBQVMsRUFBRSxFQUFFO1FBQ2hGLE1BQU0sU0FBUyxHQUFHLEVBQUUsQ0FBQyxhQUFhLElBQUksRUFBRSxDQUFDO1FBQ3pDLE1BQU0sTUFBTSxHQUFNLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQU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5tYXAobCA9PiBsLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIHNlcmllcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJpbVBhcmFtID09PSBcInN0cmluZ1wiICYmIGl0ZW0gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0cmltKGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpLCB0cmltUGFyYW0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGl0ZW0gPT09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0gPT09IFwiZ2FwXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0YWdzLmdhcDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAvLyBhY3RpdmUgcGFnZVxuICAgICAgICAgICAgICAgICAgICBodG1sICs9IGZpbGxJbih0YWdzLmFjdGl2ZSwgaXRlbSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGh0bWwgKz0gdGFncy5hZnRlcjsgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIGFsaWduLWFzc2lnbm1lbnRzL2FsaWduLWFzc2lnbm1lbnRzXG4gICAgICAgICAgICBlbC5pbm5lckhUTUwgPSBcIlwiO1xuICAgICAgICAgICAgZWwuaW5zZXJ0QWRqYWNlbnRIVE1MKFwiYWZ0ZXJiZWdpblwiLCBodG1sKTtcbiAg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PzpFbGVtZW50fG5ldmVyKSB7XG4gICAgICAgICAgICBjb25zdCB0YXJnZXQgICA9IGFyZyBpbnN0YW5jZW9mIEVsZW1lbnQgPyBhcmcgOiBkb2N1bWVudDtcbiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRzID0gdGFyZ2V0LnF1ZXJ5U2VsZWN0b3JBbGwoXCJbZGF0YS1wYWd5XVwiKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZWwgb2YgZWxlbWVudHMpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50OGFycmF5ICAgICAgICAgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzK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R0aCA9PT0gbGFzdFdpZHRoKSB7IHJldHVybiB9IC8vIG5vIGNoYW5nZTogYWJvcnRcbiAgICAgICAgICAgIGxldCBodG1sICAgICA9IHRhZ3MuYmVmb3JlO1xuICAgICAgICAgICAgY29uc3Qgc2VyaWVzID0gc2VxdWVsc1t3aWR0aC50b1N0cmluZygpXTtcbiAgICAgICAgICAgIGNvbnN0IGxhYmVscyA9IGxhYmVsU2VxdWVscz8uW3dpZHRoLnRvU3RyaW5nKCldID8/IHNlcmllcy5tYXAobCA9PiBsLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIHNlcmllcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJpbVBhcmFtID09PSBcInN0cmluZ1wiICYmIGl0ZW0gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0cmltKGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpLCB0cmltUGFyYW0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGl0ZW0gPT09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0gPT09IFwiZ2FwXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0YWdzLmdhcDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAvLyBhY3RpdmUgcGFnZVxuICAgICAgICAgICAgICAgICAgICBodG1sICs9IGZpbGxJbih0YWdzLmFjdGl2ZSwgaXRlbSwgbGFiZWwpO1xuICAgICAgICAg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ICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
@@ -81,7 +81,7 @@ const Pagy = (() => {
81
81
  const trim = (link, param) => link.replace(new RegExp(`(\\?|&)${param}=1\\b(?!&)|\\b${param}=1&`), "");
82
82
  // Public interface
83
83
  return {
84
- version: "5.9.2",
84
+ version: "5.9.3",
85
85
  // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
86
86
  init(arg) {
87
87
  const target = arg instanceof Element ? arg : document;
@@ -1 +1 @@
1
- !function(){function n(n){if(Array.isArray(n))return n}function e(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(r,a){return n(r)||e(r)||t()}var a,o,i,c,u,f,l=(a=new ResizeObserver((function(n){return n.forEach((function(n){return n.target.querySelectorAll(".pagy-rjs").forEach((function(n){return n.pagyRender()}))}))})),o=function(n,e){var t,o=r(e),i=o[0],c=o[1],u=o[2],l=o[3],p=null!==(t=n.parentElement)&&void 0!==t?t:n,s=Object.keys(c).map((function(n){return parseInt(n)})).sort((function(n,e){return e-n})),y=-1,g=function(n,e,t){return n.replace(/__pagy_page__/g,e).replace(/__pagy_label__/g,t)};(n.pagyRender=function(){var e=s.find((function(n){return n<p.clientWidth}))||0;if(e!==y){var t,r=i.before,a=c[e.toString()],o=null!==(t=null==u?void 0:u[e.toString()])&&void 0!==t?t:a.map((function(n){return n.toString()}));for(var v in a){var d=a[v],_=o[v];r+="string"==typeof l&&1===d?f(g(i.link,d.toString(),_),l):"number"==typeof d?g(i.link,d.toString(),_):"gap"===d?i.gap:g(i.active,d,_)}r+=i.after,n.innerHTML="",n.insertAdjacentHTML("afterbegin",r),y=e}})(),n.classList.contains("pagy-rjs")&&a.observe(p)},i=function(n,e){var t=r(e),a=t[0],o=t[1];return u(n,(function(n){return[n,a.replace(/__pagy_page__/,n)]}),o)},c=function(n,e){var t=r(e),a=t[0],o=t[1],i=t[2];u(n,(function(n){var e=Math.max(Math.ceil(a/parseInt(n)),1).toString();return[e,o.replace(/__pagy_page__/,e).replace(/__pagy_items__/,n)]}),i)},u=function(n,e,t){var a=n.querySelector("input"),o=a.value,i=function(){if(a.value!==o){var i=r([a.min,a.value,a.max].map((function(n){return parseInt(n)||0}))),c=i[0],u=i[1],l=i[2];if(u<c||u>l)return a.value=o,void a.select();var p=r(e(a.value)),s=p[0],y=p[1];"string"==typeof t&&"1"===s&&(y=f(y,t)),n.insertAdjacentHTML("afterbegin",y),n.querySelector("a").click()}};["change","focus"].forEach((function(n){return a.addEventListener(n,a.select)})),a.addEventListener("focusout",i),a.addEventListener("keypress",(function(n){"Enter"===n.key&&i()}))},f=function(n,e){return n.replace(new RegExp("(\\?|&amp;)".concat(e,"=1\\b(?!&amp;)|\\b").concat(e,"=1&amp;")),"")},{version:"5.9.2",init:function(r){var a,u=(r instanceof Element?r:document).querySelectorAll("[data-pagy]"),f=!0,l=!1,p=void 0;try{for(var s,y=u[Symbol.iterator]();!(f=(s=y.next()).done);f=!0){var g=s.value;try{var v=Uint8Array.from(atob(g.getAttribute("data-pagy")),(function(n){return n.charCodeAt(0)})),d=n(a=JSON.parse((new TextDecoder).decode(v)))||e(a)||t(),_=d[0],m=d.slice(1);"nav"===_?o(g,m):"combo"===_?i(g,m):"selector"===_?c(g,m):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",g,_)}catch(n){console.warn("Skipped Pagy.init() for: %o\n%s",g,n)}}}catch(n){l=!0,p=n}finally{try{f||null==y.return||y.return()}finally{if(l)throw p}}}});window.Pagy=l}();
1
+ !function(){function n(n){if(Array.isArray(n))return n}function e(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(r,a){return n(r)||e(r)||t()}var a,o,i,c,u,f,l=(a=new ResizeObserver((function(n){return n.forEach((function(n){return n.target.querySelectorAll(".pagy-rjs").forEach((function(n){return n.pagyRender()}))}))})),o=function(n,e){var t,o=r(e),i=o[0],c=o[1],u=o[2],l=o[3],p=null!==(t=n.parentElement)&&void 0!==t?t:n,s=Object.keys(c).map((function(n){return parseInt(n)})).sort((function(n,e){return e-n})),y=-1,g=function(n,e,t){return n.replace(/__pagy_page__/g,e).replace(/__pagy_label__/g,t)};(n.pagyRender=function(){var e=s.find((function(n){return n<p.clientWidth}))||0;if(e!==y){var t,r=i.before,a=c[e.toString()],o=null!==(t=null==u?void 0:u[e.toString()])&&void 0!==t?t:a.map((function(n){return n.toString()}));for(var v in a){var d=a[v],_=o[v];r+="string"==typeof l&&1===d?f(g(i.link,d.toString(),_),l):"number"==typeof d?g(i.link,d.toString(),_):"gap"===d?i.gap:g(i.active,d,_)}r+=i.after,n.innerHTML="",n.insertAdjacentHTML("afterbegin",r),y=e}})(),n.classList.contains("pagy-rjs")&&a.observe(p)},i=function(n,e){var t=r(e),a=t[0],o=t[1];return u(n,(function(n){return[n,a.replace(/__pagy_page__/,n)]}),o)},c=function(n,e){var t=r(e),a=t[0],o=t[1],i=t[2];u(n,(function(n){var e=Math.max(Math.ceil(a/parseInt(n)),1).toString();return[e,o.replace(/__pagy_page__/,e).replace(/__pagy_items__/,n)]}),i)},u=function(n,e,t){var a=n.querySelector("input"),o=a.value,i=function(){if(a.value!==o){var i=r([a.min,a.value,a.max].map((function(n){return parseInt(n)||0}))),c=i[0],u=i[1],l=i[2];if(u<c||u>l)return a.value=o,void a.select();var p=r(e(a.value)),s=p[0],y=p[1];"string"==typeof t&&"1"===s&&(y=f(y,t)),n.insertAdjacentHTML("afterbegin",y),n.querySelector("a").click()}};["change","focus"].forEach((function(n){return a.addEventListener(n,a.select)})),a.addEventListener("focusout",i),a.addEventListener("keypress",(function(n){"Enter"===n.key&&i()}))},f=function(n,e){return n.replace(new RegExp("(\\?|&amp;)".concat(e,"=1\\b(?!&amp;)|\\b").concat(e,"=1&amp;")),"")},{version:"5.9.3",init:function(r){var a,u=(r instanceof Element?r:document).querySelectorAll("[data-pagy]"),f=!0,l=!1,p=void 0;try{for(var s,y=u[Symbol.iterator]();!(f=(s=y.next()).done);f=!0){var g=s.value;try{var v=Uint8Array.from(atob(g.getAttribute("data-pagy")),(function(n){return n.charCodeAt(0)})),d=n(a=JSON.parse((new TextDecoder).decode(v)))||e(a)||t(),_=d[0],m=d.slice(1);"nav"===_?o(g,m):"combo"===_?i(g,m):"selector"===_?c(g,m):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",g,_)}catch(n){console.warn("Skipped Pagy.init() for: %o\n%s",g,n)}}}catch(n){l=!0,p=n}finally{try{f||null==y.return||y.return()}finally{if(l)throw p}}}});window.Pagy=l}();
data/lib/pagy/calendar.rb CHANGED
@@ -55,7 +55,7 @@ class Pagy # :nodoc:
55
55
  raise VariableError.new(self, :period, 'to be a an Array of min and max local Time instances', @vars[:period]) \
56
56
  unless @starting.is_a?(Time) && @ending.is_a?(Time) && !@starting.utc? && !@ending.utc? && @starting <= @ending
57
57
 
58
- @with_zone = @starting.is_a?(ActiveSupport::TimeWithZone) # remove in 6.0 and reu]place Time in the line above
58
+ @with_zone = @starting.is_a?(ActiveSupport::TimeWithZone) # remove in 6.0 and replace Time in the line above
59
59
  end
60
60
 
61
61
  # Apply the strftime format to the time (overridden by the i18n extra when localization is required)
@@ -11,22 +11,6 @@ class Pagy # :nodoc:
11
11
  module QueryUtils
12
12
  module_function
13
13
 
14
- ESCAPE_HTML = {
15
- '&' => '&amp;',
16
- '<' => '&lt;',
17
- '>' => '&gt;',
18
- "'" => '&#x27;',
19
- '"' => '&quot;',
20
- '/' => '&#x2F;'
21
- }.freeze
22
-
23
- ESCAPE_HTML_PATTERN = Regexp.union(*ESCAPE_HTML.keys)
24
-
25
- # Escape ampersands, brackets and quotes to their HTML/XML entities.
26
- def escape_html(string)
27
- string.to_s.gsub(ESCAPE_HTML_PATTERN) { |c| ESCAPE_HTML[c] }
28
- end
29
-
30
14
  def escape(str)
31
15
  URI.encode_www_form_component(str)
32
16
  end
@@ -52,7 +36,7 @@ class Pagy # :nodoc:
52
36
  # Return the URL for the page. If there is no pagy.vars[:url]
53
37
  # it works exactly as the regular #pagy_url_for, relying on the params method and Rack.
54
38
  # If there is a defined pagy.vars[:url] variable it does not need the params method nor Rack.
55
- def pagy_url_for(pagy, page, absolute: nil)
39
+ def pagy_url_for(pagy, page, absolute: false, html_escaped: false)
56
40
  return super unless pagy.vars[:url]
57
41
 
58
42
  vars = pagy.vars
@@ -64,7 +48,8 @@ class Pagy # :nodoc:
64
48
  query_string = "?#{QueryUtils.build_nested_query(pagy_deprecated_params(pagy, params))}" # remove in 6.0
65
49
  # params = pagy.params.call(params) if pagy.params.is_a?(Proc) # add in 6.0
66
50
  # query_string = "?#{Rack::Utils.build_nested_query(params)}" # add in 6.0
67
- "#{vars[:url]}#{QueryUtils.escape_html(query_string)}#{vars[:fragment]}"
51
+ query_string = query_string.gsub('&', '&amp;') if html_escaped # the only unescaped entity
52
+ "#{vars[:url]}#{query_string}#{vars[:fragment]}"
68
53
  end
69
54
  end
70
55
  # In ruby 3+ `UrlHelpers.prepend StandaloneExtra` would be enough instead of using the next 2 lines
@@ -18,7 +18,7 @@ class Pagy # :nodoc:
18
18
  def pagy_prev_link(pagy, text: pagy_t('pagy.nav.prev'), link_extra: '')
19
19
  if pagy.prev
20
20
  %(<span class="page prev"><a href="#{
21
- pagy_url_for(pagy, pagy.prev)
21
+ pagy_url_for(pagy, pagy.prev, html_escaped: true)
22
22
  }" rel="prev" aria-label="previous" #{
23
23
  pagy.vars[:link_extra]
24
24
  } #{link_extra}>#{text}</a></span>)
@@ -31,7 +31,7 @@ class Pagy # :nodoc:
31
31
  def pagy_next_link(pagy, text: pagy_t('pagy.nav.next'), link_extra: '')
32
32
  if pagy.next
33
33
  %(<span class="page next"><a href="#{
34
- pagy_url_for(pagy, pagy.next)
34
+ pagy_url_for(pagy, pagy.next, html_escaped: true)
35
35
  }" rel="next" aria-label="next" #{
36
36
  pagy.vars[:link_extra]
37
37
  } #{link_extra}>#{text}</a></span>)
@@ -42,12 +42,12 @@ class Pagy # :nodoc:
42
42
 
43
43
  # Return the HTML link tag for the previous page or nil
44
44
  def pagy_prev_link_tag(pagy)
45
- %(<link href="#{pagy_url_for(pagy, pagy.prev)}" rel="prev"/>) if pagy.prev
45
+ %(<link href="#{pagy_url_for(pagy, pagy.prev, html_escaped: true)}" rel="prev"/>) if pagy.prev
46
46
  end
47
47
 
48
48
  # Return the HTML link tag for the next page or nil
49
49
  def pagy_next_link_tag(pagy)
50
- %(<link href="#{pagy_url_for(pagy, pagy.next)}" rel="next"/>) if pagy.next
50
+ %(<link href="#{pagy_url_for(pagy, pagy.next, html_escaped: true)}" rel="next"/>) if pagy.next
51
51
  end
52
52
  end
53
53
  Frontend.prepend SupportExtra
data/lib/pagy/frontend.rb CHANGED
@@ -63,7 +63,7 @@ class Pagy
63
63
  def pagy_link_proc(pagy, link_extra: '')
64
64
  p_prev = pagy.prev
65
65
  p_next = pagy.next
66
- left, right = %(<a href="#{pagy_url_for pagy, PAGE_PLACEHOLDER}" #{
66
+ left, right = %(<a href="#{pagy_url_for(pagy, PAGE_PLACEHOLDER, html_escaped: true)}" #{
67
67
  pagy.vars[:link_extra]} #{link_extra}).split(PAGE_PLACEHOLDER, 2)
68
68
  lambda do |page, text = pagy.label_for(page), extra_attrs = ''|
69
69
  %(#{left}#{page}#{right}#{ case page
@@ -6,7 +6,7 @@ class Pagy
6
6
  # Return the URL for the page, relying on the params method and Rack by default.
7
7
  # It supports all Rack-based frameworks (Sinatra, Padrino, Rails, ...).
8
8
  # For non-rack environments you can use the standalone extra
9
- def pagy_url_for(pagy, page, absolute: nil)
9
+ def pagy_url_for(pagy, page, absolute: false, html_escaped: false)
10
10
  vars = pagy.vars
11
11
  page_param = vars[:page_param].to_s
12
12
  items_param = vars[:items_param].to_s
@@ -17,7 +17,8 @@ class Pagy
17
17
  query_string = "?#{Rack::Utils.build_nested_query(pagy_deprecated_params(pagy, params))}" # remove in 6.0
18
18
  # params = pagy.params.call(params) if pagy.params.is_a?(Proc) # add in 6.0
19
19
  # query_string = "?#{Rack::Utils.build_nested_query(params)}" # add in 6.0
20
- "#{request.base_url if absolute}#{request.path}#{Rack::Utils.escape_html(query_string)}#{vars[:fragment]}"
20
+ query_string = query_string.gsub('&', '&amp;') if html_escaped # the only unescaped entity
21
+ "#{request.base_url if absolute}#{request.path}#{query_string}#{vars[:fragment]}"
21
22
  end
22
23
 
23
24
  private
data/lib/pagy.rb CHANGED
@@ -5,7 +5,7 @@ require 'pathname'
5
5
 
6
6
  # Core class
7
7
  class Pagy
8
- VERSION = '5.9.2'
8
+ VERSION = '5.9.3'
9
9
 
10
10
  # Root pathname to get the path of Pagy files like templates or dictionaries
11
11
  def self.root
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.9.2
4
+ version: 5.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-28 00:00:00.000000000 Z
11
+ date: 2022-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport