anchor.diff:        LevelQ = wf:q("level-"++Path),
         Level = if LevelQ == undefined -> "0"; true -> LevelQ end,
         Text = wf:q("textarea-"++Path),
  +      Format = wf:q(input_format),
         [PostId|_] = string:tokens(Path, "-"),
         [_PostId|Parents] = path_to_parents(Path),
   
  -      SanText = case Text of undefined -> Text; _ -> unicode:characters_to_binary(mtws_sanitizer:sanitize(iolist_to_binary(["<p>", Text, "</p>"]))) end,
         UserName = ?a2b(wf:user()),                   % FIXME
         Author = #mt_author{
           id = UserName,
  
positive.code:   User = wf:user(),
    if
      User =/= undefined ->
        wf:replace(Target, comment_post_items(Id));
      true ->
        pass
    end.
  
negative.code:       #button{id = cancel, text = Cancel, postback = CancelPostback}
    ]}.
  
  comment_post_items(Id, Format) ->
    #panel{id = "comment-items-"++Id, class = "comment-add-box",
      body = [
        #textarea{id="textarea-"++Id},
        #br{},
        #dropdown{id=input_format, options =
          [#option{text=TVal, value=Val, selected=Val=:=Format} || {TVal, Val} <- [{"HTML", "html"}, {"Markdown", "markdown"}]]},
        #br{},
        #button{id=submit, text="Submit",postback="add-comment-" ++ Id},
        #button{text="Cancel",postback="cancel-comment-" ++ Id}
  