@@ -60,7 +60,7 @@ export const sanitizeForm = (form: Subscription): Subscription => {
6060 form . jsonTimestamp . path = newVal
6161 }
6262 }
63- if ( form . stringMeasurement ) {
63+ if ( form . stringMeasurement ?. pattern ) {
6464 form . stringMeasurement . pattern =
6565 form . stringMeasurement ?. pattern . replace ( / \\ \\ / g, '\\' ) ?? ''
6666 }
@@ -74,6 +74,10 @@ export const sanitizeForm = (form: Subscription): Subscription => {
7474 t . pattern = t . pattern ?. replace ( / \\ \\ / g, '\\' ) ?? ''
7575 } )
7676 }
77+ if ( form . stringTimestamp ?. pattern ) {
78+ form . stringTimestamp . pattern =
79+ form . stringTimestamp ?. pattern . replace ( / \\ \\ / g, '\\' ) ?? ''
80+ }
7781 if ( form . brokerPassword === '' || form . brokerUsername === '' ) {
7882 delete form . brokerUsername
7983 delete form . brokerPassword
@@ -129,6 +133,24 @@ export const sanitizeUpdateForm = (form: Subscription): Subscription => {
129133 form . jsonTimestamp . type = 'string'
130134 }
131135 }
136+ if ( form . stringMeasurement ?. pattern ) {
137+ form . stringMeasurement . pattern =
138+ form . stringMeasurement ?. pattern . replace ( / \\ \\ / g, '\\' ) ?? ''
139+ }
140+ if ( form . stringFields ) {
141+ form . stringFields . map ( f => {
142+ f . pattern = f . pattern ?. replace ( / \\ \\ / g, '\\' ) ?? ''
143+ } )
144+ }
145+ if ( form . stringTags ) {
146+ form . stringTags . map ( t => {
147+ t . pattern = t . pattern ?. replace ( / \\ \\ / g, '\\' ) ?? ''
148+ } )
149+ }
150+ if ( form . stringTimestamp ?. pattern ) {
151+ form . stringTimestamp . pattern =
152+ form . stringTimestamp ?. pattern . replace ( / \\ \\ / g, '\\' ) ?? ''
153+ }
132154 delete form . id
133155 delete form . orgID
134156 delete form . processGroupID
0 commit comments