File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,10 +102,10 @@ const operationsGenerator = createOperationsGenerator({
102102 mozjpeg : Number ,
103103 preserveAspectRatio : Number ,
104104 preserveNaturalSize : Number ,
105- // Encode colours so # does not break the URL path segment
106- background : ( value : string ) => value . startsWith ( '#' ) ? value . replace ( '#' , '%23' ) : value ,
107- textColor : ( value : string ) => value . startsWith ( '#' ) ? value . replace ( '#' , '%23' ) : value ,
108- textBackground : ( value : string ) => value . startsWith ( '#' ) ? value . replace ( '#' , '%23' ) : value ,
105+ // Encode # so it does not break the URL path segment
106+ background : ( value : string ) => value . replaceAll ( '#' , '%23' ) ,
107+ textColor : ( value : string ) => value . replaceAll ( '#' , '%23' ) ,
108+ textBackground : ( value : string ) => value . replaceAll ( '#' , '%23' ) ,
109109 // Encode text watermarks
110110 text : ( value : string ) => encodeURIComponent ( value ) ,
111111 } ,
You can’t perform that action at this time.
0 commit comments