Skip to content

Commit

Permalink
Fixes boundary character escaping in regex in js trim function (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
artplan1 committed May 1, 2020
1 parent 3561885 commit d7a9f7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/javascripts/pagy.js
Expand Up @@ -101,6 +101,6 @@ Pagy.addInputEventListeners = function(input, handler){
};

Pagy.trim = function(html, param){
var re = new RegExp('[?&]' + param + '=1\b(?!&)|\b' + param + '=1&');
var re = new RegExp('[?&]' + param + '=1\\b(?!&)|\\b' + param + '=1&');
return html.replace(re, '');
};

0 comments on commit d7a9f7a

Please sign in to comment.