URL filter functionality.
This commit is contained in:
@@ -13,7 +13,7 @@ export const urlFilter = (data, { raw }) => {
|
||||
|
||||
const cleanUrl = url => {
|
||||
try {
|
||||
const { pathname, search } = new URL(url);
|
||||
const { pathname, search } = new URL(url, location.origin);
|
||||
|
||||
if (search.startsWith('?/')) {
|
||||
return `${pathname}${search}`;
|
||||
@@ -30,7 +30,7 @@ export const urlFilter = (data, { raw }) => {
|
||||
return obj;
|
||||
}
|
||||
|
||||
const url = cleanUrl(`http://x${x}`);
|
||||
const url = cleanUrl(x);
|
||||
|
||||
if (url) {
|
||||
if (!obj[url]) {
|
||||
|
||||
Reference in New Issue
Block a user