anchor.diff:      sanitize(ParseTree, [], ExtraElts, ExtraAttrs, Options).
   
   sanitize(B, Stack, _ExtraElts, _ExtraAttrs, Options) when is_binary(B) ->
  -    case sanitize_callback({'TextNode', B}, Stack, Options) of
  +    case sanitize_element({'TextNode', B}, Stack, Options) of
           {'TextNode', B1} -> escape(iolist_to_binary(B1));
           Other -> Other
       end; 
   sanitize({comment, _Text} = Comment, Stack, _ExtraElts, _ExtraAttrs, Options) ->
  -    sanitize_callback(Comment, Stack, Options);
  +    sanitize_element(Comment, Stack, Options);
   sanitize({pi, _Raw}, _Stack, _ExtraElts, _ExtraAttrs, _Options) ->
       <<>>;
   sanitize({pi, _Tag, _Attrs}, _Stack, _ExtraElts, _ExtraAttrs, _Options) ->
  
positive.code:             Tag = { Elt, 
                      Attrs1,
                      [ sanitize(Encl, Stack1, ExtraElts, ExtraAttrs, Options) || Encl <- Enclosed ]},
              sanitize_callback(Tag, Stack, Options);
          false ->
              case skip_contents(Elt) of
                  false ->
  
negative.code:             end
      end.
  
  sanitize_element(Element, Stack, Options) ->
      Callback = proplists:get_value(element, Options, fun(E) -> E end),
      sanitize_element(Callback, Element, Stack, Options).
  
  sanitize_element(F, Element, _Stack, _Options) when is_function(F, 1) ->
      F(Element);
  sanitize_element(F, Element, _Stack, Options) when is_function(F, 2) ->
      F(Element, Options);
  sanitize_element(F, Element, Stack, Options) when is_function(F, 3) ->
      F(Element, Stack, Options);
  sanitize_element({M, F, A}, Element, Stack, _Options) ->
      erlang:apply(M, F, [Element, Stack|A]).
  
  
  %% @doc Flatten the sanitized html tree to a binary 
  