Use the regexp frontend module (EJAB-921)

This commit is contained in:
Badlop 2013-09-10 18:34:38 +02:00
parent 360ed6a2e6
commit a03088d033
3 changed files with 4 additions and 5 deletions

View File

@ -115,7 +115,7 @@ get_process_name(Host) ->
gen_mod:get_module_proc(Host, ?PROCNAME).
replace_host(Host, Filename) ->
element(2, regexp:gsub(Filename, "@HOST@", Host)).
re:replace(Filename, "@HOST@", Host, [global, {return, list}]).
open_file(Filename) ->
{ok, File} = file:open(Filename, [append]),

View File

@ -133,7 +133,7 @@ check_authentication2(AssocHandle, Sig, Signed, Query) ->
%% Fields is a list of fields which should be in the query as openid.Field
%% return the list of argument [{Key,Value}] as they appears in the query
retrieve_params(Fields,Query) ->
{ok, FList} = regexp:split(Fields, ","),
FList = re:split(Fields, ",", [{return, list}]),
retrieve_params_recurse(FList,Query).
retrieve_params_recurse([],_) -> [];
retrieve_params_recurse([Key | Tail ], Query) ->

View File

@ -667,9 +667,8 @@ intund2string(undefined) -> "undefined";
intund2string(Int) when is_integer(Int) -> integer_to_list(Int).
escape(S1) ->
{ok, S2, _} = regexp:gsub(S1, "\'", "\\'"),
{ok, S3, _} = regexp:gsub(S2, "\n", "\\n"),
S3.
S2 = re:replace(S1, "\'", "\\'", [global, {return, list}]),
re:replace(S2, "\n", "\\n", [global, {return, list}]).
get_baseurl(Host) ->
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),