Move cases of .replace(re, Function) out from inline (to avoid being redeclared on every use). Fixes #4114.
Attach a file by drag & drop or click to upload