Module:string/pattern escape

Documentation for this module may be created at Module:string/pattern escape/documentation

return function (str)
	return mw.ustring.gsub(str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
end