Jinja Compat Tests

Enabled engines

replace filter

Template

{{ 'aaabbbccc'|replace('b', '.', 2) }}

(error) v1.10.1

Invalid filter: 'replace'

v2.8.0

aaa..bccc

v3.0.6

aaabbbccc

v2.5.0

aaa..bccc

(error) v1.4.2

Invalid flags supplied to RegExp constructor '2'

v1.24.2

aaa...ccc

v0.9.5

aaabbbccc

Template

{{ 'aaabbbccc'|replace('', '.') }}

(error) v1.10.1

Invalid filter: 'replace'

v2.8.0

.a.a.a.b.b.b.c.c.c.

v3.0.6

aaabbbccc

v2.5.0

.a.a.a.b.b.b.c.c.c.

v1.4.2

.aaabbbccc

v1.24.2

aaabbbccc

v0.9.5

aaabbbccc

Template

{{ 'aaabbbccc'|replace('b', '.') }}

(error) v1.10.1

Invalid filter: 'replace'

v2.8.0

aaa...ccc

v3.0.6

aaabbbccc

v2.5.0

aaa...ccc

v1.4.2

aaa.bbccc

v1.24.2

aaa...ccc

v0.9.5

aaabbbccc

Template

{{ 111222333|replace('2', '.') }}

(error) v1.10.1

Invalid filter: 'replace'

v2.8.0

111...333

v3.0.6

111222333

v2.5.0

111...333

(error) v1.4.2

input.replace is not a function

v1.24.2

111...333

(error) v0.9.5

TypeError: string.split is not a function
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

Template

{{ 'aaabbbccc'|replace('b*', '.') }}

(error) v1.10.1

Invalid filter: 'replace'

v2.8.0

aaabbbccc

v3.0.6

aaabbbccc

v2.5.0

aaabbbccc

v1.4.2

.aaabbbccc

v1.24.2

aaa...ccc

v0.9.5

aaabbbccc