mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Fix issue with unicode filtering. Closes #1258
This commit is contained in:
parent
be8291c856
commit
358c725828
@ -2,6 +2,7 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import Button from 'components/common/Button';
|
||||
import Times from 'assets/times.svg';
|
||||
import { safeDecodeURI } from 'lib/url';
|
||||
import styles from './FilterTags.module.css';
|
||||
|
||||
export default function FilterTags({ params, onClick }) {
|
||||
@ -17,7 +18,7 @@ export default function FilterTags({ params, onClick }) {
|
||||
return (
|
||||
<div key={key} className={styles.tag}>
|
||||
<Button icon={<Times />} onClick={() => onClick(key)} variant="action" iconRight>
|
||||
{`${key}: ${params[key]}`}
|
||||
{`${key}: ${safeDecodeURI(params[key])}`}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
@ -41,7 +41,7 @@ export default async (req, res) => {
|
||||
const stats = Object.keys(metrics[0]).reduce((obj, key) => {
|
||||
obj[key] = {
|
||||
value: Number(metrics[0][key]) || 0,
|
||||
change: Number(metrics[0][key] - prevPeriod[0][key]) || 0,
|
||||
change: Number(metrics[0][key]) - Number(prevPeriod[0][key]) || 0,
|
||||
};
|
||||
return obj;
|
||||
}, {});
|
||||
|
Loading…
Reference in New Issue
Block a user