@katebutler opened this Pull Request on October 3rd 2019 Contributor

Fixes #14943
This line is not needed as the decodeURIComponent is already done whenever newmetric.value is set.

@tsteur commented on October 4th 2019 Member

@katebutler it seems to work for my case but now failing for this case: https://builds-artifacts.matomo.org/matomo-org/matomo/3.x-dev/36240/SegmentSelectorEditorTest_saved_details.png

I wonder if that's because some segments might be double encoded while some might not or so...

I reckon we could just try to decode it there, and if it fails return the regular version... like

try {
return decode...(newMetric.value)
} catch (e){
return newMetric.value
@katebutler commented on October 6th 2019 Contributor

@tsteur Have added a second decodeUIRComponent in a try/catch as suggested, build passes now.

This Pull Request was closed on October 7th 2019
Powered by GitHub Issue Mirror