Mercurial > hgrepos > hgweb.cgi > s4
comparison s4-cgi.sh @ 942:5d70fa029f8d draft
Support MathJax rendering
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 25 Oct 2021 18:39:44 +0900 |
parents | a6462eea48be |
children | 1ffaa8b2b1bf |
comparison
equal
deleted
inserted
replaced
941:79c7e64884c4 | 942:5d70fa029f8d |
---|---|
42 <tr><td>新パスワード(確認)</td><td><input type="password" name="pswd2"></td></tr> | 42 <tr><td>新パスワード(確認)</td><td><input type="password" name="pswd2"></td></tr> |
43 </table> | 43 </table> |
44 EOF | 44 EOF |
45 } | 45 } |
46 cgi_text() { | 46 cgi_text() { |
47 _v=`echo "$2"|htmlescape` | 47 _v=`printf '%s' "$2"|htmlescape` |
48 echo "<input type=\"text\" name=\"$1\" value=\"$_v\" $3>" | 48 echo "<input type=\"text\" name=\"$1\" value=\"$_v\" $3>" |
49 } | 49 } |
50 cgi_textarea() { | 50 cgi_textarea() { |
51 _v=`echo "$2"|htmlescape` | 51 _v=`printf '%s' "$2"|htmlescape` |
52 cat<<EOF | 52 cat<<EOF |
53 <textarea name="$1" $3>$_v</textarea> | 53 <textarea name="$1" $3>$_v</textarea> |
54 EOF | 54 EOF |
55 } | 55 } |
56 cgi_file() ( # In a subshell | 56 cgi_file() ( # In a subshell |
77 ) | 77 ) |
78 cgi_multi() ( | 78 cgi_multi() ( |
79 # $1=name $2=dir $3=func $4=args... | 79 # $1=name $2=dir $3=func $4=args... |
80 # `dir' should contain $name.count and $name.N where N is 1 upto N | 80 # `dir' should contain $name.count and $name.N where N is 1 upto N |
81 i=1 name=$1 dir=$2 func=$3 | 81 i=1 name=$1 dir=$2 func=$3 |
82 argnomulti=`echo "$4"|sed 's/multiple//'` # No multiple for Replaced entres | 82 argnomulti=`printf '%s' "$4"|sed 's/multiple//'` # No multiple for Replaced entries |
83 n=`cat $dir/$name.count` | 83 n=`cat $dir/$name.count` |
84 case "$func" in | 84 case "$func" in |
85 *file) addrename=yes ;; | 85 *file) addrename=yes ;; |
86 esac | 86 esac |
87 echo '<table class="text">' | 87 echo '<table class="text">' |