remove facebook spam from url

This commit is contained in:
j 2020-05-31 10:49:50 +02:00
parent 48a3043a79
commit ffeee38d7d

View file

@ -809,7 +809,10 @@ Ox.URL = function(options) {
} }
function parseURL(str, callback) { function parseURL(str, callback) {
// remove facebook spam
str = str.replace(/\?fbclid=[A-Za-z0-9_]+/, '')
// fixme: removing trailing slash makes it impossible to search for '/' // fixme: removing trailing slash makes it impossible to search for '/'
var split = str.split('#'), var split = str.split('#'),
parts = split.shift().replace(/(^\/|\/$)/g, '').split('/'), parts = split.shift().replace(/(^\/|\/$)/g, '').split('/'),
state = split.length && split[0].length state = split.length && split[0].length