File tree Expand file tree Collapse file tree 6 files changed +32
-32
lines changed Expand file tree Collapse file tree 6 files changed +32
-32
lines changed Original file line number Diff line number Diff line change @@ -7579,9 +7579,12 @@ const EasyCoder_Value = {
7579
7579
encode : ( value , encoding ) => {
7580
7580
if ( value ) {
7581
7581
switch ( encoding ) {
7582
+ default :
7582
7583
case `ec` :
7583
7584
return value . replace ( / \n / g, `~lf~` )
7584
- . replace ( / \r / g, `~cr~` )
7585
+ . replace ( / % 0 a / g, `~lf~` )
7586
+ . replace ( / \n / g, `~cr~` )
7587
+ . replace ( / % 0 d / g, `~cr~` )
7585
7588
. replace ( / " / g, `~dq~` )
7586
7589
. replace ( / ' / g, `~sq~` )
7587
7590
. replace ( / \\ / g, `~bs~` ) ;
@@ -7591,8 +7594,6 @@ const EasyCoder_Value = {
7591
7594
return btoa ( value ) ;
7592
7595
case `sanitize` :
7593
7596
return value . normalize ( `NFD` ) . replace ( / [ \u0300 - \u036f ] / g, `` ) ;
7594
- default :
7595
- return value ;
7596
7597
}
7597
7598
}
7598
7599
return value ;
@@ -7601,9 +7602,10 @@ const EasyCoder_Value = {
7601
7602
decode : ( value , encoding ) => {
7602
7603
if ( value ) {
7603
7604
switch ( encoding ) {
7605
+ default :
7604
7606
case `ec` :
7605
7607
return value . replace ( / % 0 a / g, `\n` )
7606
- . replace ( / ~ l f ` / g, `\n` )
7608
+ . replace ( / ~ l f ~ / g, `\n` )
7607
7609
. replace ( / % 0 d / g, `\r` )
7608
7610
. replace ( / ~ c r ~ / g, `\n` )
7609
7611
. replace ( / ~ d q ~ / g, `"` )
@@ -7614,8 +7616,6 @@ const EasyCoder_Value = {
7614
7616
return decoded . replace ( / \+ / g, ` ` ) ;
7615
7617
case `base64` :
7616
7618
return atob ( value ) ;
7617
- default :
7618
- return value ;
7619
7619
}
7620
7620
}
7621
7621
return value ;
Original file line number Diff line number Diff line change @@ -173,9 +173,12 @@ const EasyCoder_Value = {
173
173
encode : ( value , encoding ) => {
174
174
if ( value ) {
175
175
switch ( encoding ) {
176
+ default :
176
177
case `ec` :
177
178
return value . replace ( / \n / g, `~lf~` )
178
- . replace ( / \r / g, `~cr~` )
179
+ . replace ( / % 0 a / g, `~lf~` )
180
+ . replace ( / \n / g, `~cr~` )
181
+ . replace ( / % 0 d / g, `~cr~` )
179
182
. replace ( / " / g, `~dq~` )
180
183
. replace ( / ' / g, `~sq~` )
181
184
. replace ( / \\ / g, `~bs~` ) ;
@@ -185,8 +188,6 @@ const EasyCoder_Value = {
185
188
return btoa ( value ) ;
186
189
case `sanitize` :
187
190
return value . normalize ( `NFD` ) . replace ( / [ \u0300 - \u036f ] / g, `` ) ;
188
- default :
189
- return value ;
190
191
}
191
192
}
192
193
return value ;
@@ -195,9 +196,10 @@ const EasyCoder_Value = {
195
196
decode : ( value , encoding ) => {
196
197
if ( value ) {
197
198
switch ( encoding ) {
199
+ default :
198
200
case `ec` :
199
201
return value . replace ( / % 0 a / g, `\n` )
200
- . replace ( / ~ l f ` / g, `\n` )
202
+ . replace ( / ~ l f ~ / g, `\n` )
201
203
. replace ( / % 0 d / g, `\r` )
202
204
. replace ( / ~ c r ~ / g, `\n` )
203
205
. replace ( / ~ d q ~ / g, `"` )
@@ -208,8 +210,6 @@ const EasyCoder_Value = {
208
210
return decoded . replace ( / \+ / g, ` ` ) ;
209
211
case `base64` :
210
212
return atob ( value ) ;
211
- default :
212
- return value ;
213
213
}
214
214
}
215
215
return value ;
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments