local page="$1" title
title="${page%/}"; title="${title##*/}"
- # Important! Web Server response including newline newline
+ # Important! Web Server response including newline
printf "%s\r\n" "Content-Type: text/html; charset=utf-8" ""
cat <<-EOF
</head><body id="$(HTML "$page")" class="editor">
$(theme_header)
<main><form method=POST>
- <textarea name=page>$(wiki_text "$page" |HTML)</textarea>
- <button type=submit name=update value="$(HTML "$page")">Update</button>
- <button type=submit name=cancel value="$(HTML "$page")">Cancel</button>
+ <input type=hidden name=session_key value="${SESSION_KEY}"/>
+ <textarea name=pagetext>$(wiki_text "$page" |HTML)</textarea>
+ <button type=submit name=action value=update>Update</button>
+ <button type=submit name=action value=cancel>Cancel</button>
</form></main>
$(theme_footer)
</body></html>