mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Removed encoding.
This commit is contained in:
parent
87737e35bc
commit
fbea08ae59
2 changed files with 18 additions and 42 deletions
|
|
@ -34,24 +34,6 @@
|
|||
|
||||
/* Helper functions */
|
||||
|
||||
const encode = str => {
|
||||
if (!str) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
try {
|
||||
const result = decodeURI(str);
|
||||
|
||||
if (result !== str) {
|
||||
return result;
|
||||
}
|
||||
} catch (e) {
|
||||
return str;
|
||||
}
|
||||
|
||||
return encodeURI(str);
|
||||
};
|
||||
|
||||
const parseURL = url => {
|
||||
try {
|
||||
const { pathname, search, hash } = new URL(url, location.href);
|
||||
|
|
@ -67,9 +49,9 @@
|
|||
hostname,
|
||||
screen,
|
||||
language,
|
||||
title: encode(title),
|
||||
url: encode(currentUrl),
|
||||
referrer: encode(currentRef),
|
||||
title,
|
||||
url: currentUrl,
|
||||
referrer: currentRef,
|
||||
tag: tag ? tag : undefined,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue