With previous implementation it was impossible to use this pipe to remove some patterns from the string.
This change is a fix to allow empty strings as replacement variables.
Coverage remained the same at 100.0% when pulling 9e1c3ccef5e1760f6072dd244836d0f55c8e9c67 on fantoine:patch-1 into d1f6026e01a81244101cf0b905336e2701bda3b5 on fknop:master.
With previous implementation it was impossible to use this pipe to remove some patterns from the string. This change is a fix to allow empty strings as replacement variables.
Previous behavior:
{{ 'my string' | replace:' ':'' }}
returned'my string'
Fixed behavior:
{{ 'my string' | replace:' ':'' }}
should return'mystring'