Jump to content

Module:String: Difference between revisions

fix pattern escape in replace function
m>Dcoetzee
(+Unit tests for this module are available at Module:String/tests.)
m>Dragons flight
(fix pattern escape in replace function)
Line 259: Line 259:
     if plain then
     if plain then
         pattern = str._escapePattern( pattern );
         pattern = str._escapePattern( pattern );
         replace = str._escapePattern( replace );
         replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
     end
     end
      
      
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.