Fix escaping of source filters (#3930)

* Fix escaping of source filters

* CHANGELOG

* Fix typo

Co-authored-by: Karl-Aksel Puulmann <macobo@users.noreply.github.com>

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
Co-authored-by: Karl-Aksel Puulmann <macobo@users.noreply.github.com>
pull/3016/merge
Uku Taht 3 years ago committed by GitHub
parent 52c226c428
commit 1d017e86a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
### Added
- Add `total_conversions` and `conversion_rate` to `visitors.csv` in a goal-filtered CSV export
- Ability to display total conversions (with a goal filter) on the main graph
- Add `conversion_rate` to Stats API Timeseries and on the main graph
- Add `conversion_rate` to Stats API Timeseries and on the main graph
- Add `time_on_page` metric into the Stats API
- County Block List in Site Settings
- Query the `views_per_visit` metric based on imported data as well if possible
@ -76,6 +76,7 @@ All notable changes to this project will be documented in this file.
- Fix automatic scrolling to the bottom on the dashboard if previously selected properties tab plausible/analytics#3872
- Allow running the container with arbitrary UID plausible/analytics#2986
- Fix `width=manual` in embedded dashboards plausible/analytics#3910
- Fix URL escaping when pipes are used in UTM tags plausible/analytics#3930
## v2.0.0 - 2023-07-12

@ -7,6 +7,7 @@ import ListReport from '../reports/list'
import { VISITORS_METRIC, maybeWithCR } from '../reports/metrics';
import { Menu, Transition } from '@headlessui/react'
import { ChevronDownIcon } from '@heroicons/react/20/solid'
import { escapeFilterValue } from '../../util/filters'
import classNames from 'classnames'
const UTM_TAGS = {
@ -25,7 +26,7 @@ function AllSources(props) {
}
function getFilterFor(listItem) {
return { source: listItem['name'] }
return { source: escapeFilterValue(listItem['name']) }
}
function renderIcon(listItem) {
@ -60,7 +61,7 @@ function UTMSources(props) {
}
function getFilterFor(listItem) {
return { [props.tab]: listItem['name'] }
return { [props.tab]: escapeFilterValue(listItem['name']) }
}
return (

Loading…
Cancel
Save