$PBExportHeader$f_texttohtml.srf
global type f_texttohtml from function_object
end type
forward prototypes
global function string f_texttohtml (string arg_text)
end prototypes
global function string f_texttohtml (string arg_text);long ll_num
ll_num = 1
do while true
ll_num = pos(arg_text, '~r~n', ll_num)
if ll_num = 0 then exit
arg_text = replace(arg_text, ll_num, 2, '
')
ll_num = ll_num + 4
loop
ll_num = 1
do while true
ll_num = pos(arg_text, '~r', ll_num)
if ll_num = 0 then exit
arg_text = replace(arg_text, ll_num, 1, '
')
ll_num = ll_num + 4
loop
ll_num = 1
do while true
ll_num = pos(arg_text, '~n', ll_num)
if ll_num = 0 then exit
arg_text = replace(arg_text, ll_num, 1, '
')
ll_num = ll_num + 4
loop
return arg_text
end function