mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-19 10:47:58 +01:00
Trim sitefilters.
This commit is contained in:
@@ -453,7 +453,7 @@ var Option = Class("Option", {
|
||||
result = undefined;
|
||||
|
||||
let [, bang, filter] = /^(!?)(.*)/.exec(pattern);
|
||||
filter = Option.dequote(filter);
|
||||
filter = Option.dequote(filter).trim();
|
||||
|
||||
let quote = this.keepQuotes ? util.identity : Option.quote;
|
||||
|
||||
|
||||
@@ -420,6 +420,8 @@ var Styles = Module("Styles", {
|
||||
* @returns {nsIURI -> boolean}
|
||||
*/
|
||||
matchFilter: function (filter) {
|
||||
filter = filter.trim();
|
||||
|
||||
if (filter === "*")
|
||||
var test = function test(uri) true;
|
||||
else if (!/^(?:[a-z-]+:|[a-z-.]+$)/.test(filter)) {
|
||||
|
||||
Reference in New Issue
Block a user