Module:String: Difference between revisions

fix pattern escape in replace function
(+Unit tests for this module are available at Module:String/tests.)
(fix pattern escape in replace function)
Line 259:
if plain then
pattern = str._escapePattern( pattern );
replace = strmw._escapePatternustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end