Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 38 lines (32 sloc) 1.276 kb
6377222 @klacke ""
authored
1
2 <erl>
3
4 out(A) ->
ef3a52a @klacke Removed the atoms in parse_post and parse query, backwards incompatib…
authored
5 L = case queryvar(A,"page") of
dbab7a3 @klacke ssi include with var expansion + docs
authored
6 {ok, Page} ->
0be3c7e @klacke untabified all of yaws
authored
7 %% only allow regular chars in Page
8 case lists:all(fun(C) ->
9 if
10 $a =< C, C =< $z ->
11 true;
12 $A =< C, C =< $Z ->
13 true;
8b75f8b @klacke Fixed probles with paths that had a query part ending up in the cache
authored
14 C == $_ ->
15 true;
ef91478 @klacke ""
authored
16 C == $. ->
17 true;
0be3c7e @klacke untabified all of yaws
authored
18 true ->
19 false
20 end
21 end, Page) of
22 true ->
68ab570 @klacke locale setting
authored
23 os:cmd("env LC_ALL=en_US.ISO-8859-1 man " ++ Page ++ " | col -b -p -x");
0be3c7e @klacke untabified all of yaws
authored
24 false ->
25 "illegal character detected in query arg"
26 end;
27 undefined ->
28 "no man page found in query arg "
29 end,
bea8261 @klacke added log_wrap_size, configurable wrap size for all logs, fixed a bug…
authored
30 {ehtml,
31 {html,[],
32 {'div',[{class,"man"}],
33 {pre,[], L}}}}.
34
35
6377222 @klacke ""
authored
36
37 </erl>
Something went wrong with that request. Please try again.