Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (32 sloc) 1.273 kb
<erl>
out(A) ->
L = case queryvar(A,"page") of
{ok, Page} ->
%% only allow regular chars in Page
case lists:all(fun(C) ->
if
$a =< C, C =< $z ->
true;
$A =< C, C =< $Z ->
true;
C == $_ ->
true;
C == $. ->
true;
true ->
false
end
end, Page) of
true ->
os:cmd("env LC_ALL=en_US.ISO-8859-1 man " ++ Page ++ " | col -b -p -x");
false ->
"illegal character detected in query arg"
end;
undefined ->
"no man page found in query arg "
end,
{ehtml,
{html,[],
{'div',[{class,"man"}],
{pre,[], L}}}}.
</erl>
Jump to Line
Something went wrong with that request. Please try again.