anchor.diff:              Tag = { Elt, 
                       Attrs1,
                       [ sanitize(Encl, Stack1, ExtraElts, ExtraAttrs, Options) || Encl <- Enclosed ]},
  -            sanitize_callback(Tag, Options);
  +            sanitize_callback(Tag, Stack, Options);
           false ->
               case skip_contents(Elt) of
                   false ->
  
positive.code:     Sanitized = sanitize(Parsed, [], ExtraElts, ExtraAttrs, Options),
      flatten(Sanitized).
  
  sanitize(B, _Stack, _ExtraElts, _ExtraAttrs, Options) when is_binary(B) ->
      case sanitize_callback({'TextNode', B}, Options) of
          {'TextNode', B1} -> escape(iolist_to_binary(B1));
          Other -> Other
      end; 
  sanitize({comment, _Text} = Comment, _Stack, _ExtraElts, _ExtraAttrs, Options) ->
      sanitize_callback(Comment, Options);
  sanitize({pi, _Raw}, _Stack, _ExtraElts, _ExtraAttrs, _Options) ->
      <<>>;
  sanitize({pi, _Tag, _Attrs}, _Stack, _ExtraElts, _ExtraAttrs, _Options) ->
  
negative.code:             end
      end.
  
  sanitize_callback(Element, _Stack, Context) when is_tuple(Context), element(1, Context) =:= context ->
      z_notifier:foldl(sanitize_element, Element, Context);
  sanitize_callback(Element, Stack, Options) ->
      case proplists:get_value(element, Options) of
          undefined -> Element;
          {M,F,A} -> erlang:apply(M, F, [Element,Stack|A]);
          F when is_function(F,1) -> F(Element);
          F when is_function(F,2) -> F(Element,Options);
          F when is_function(F,3) -> F(Element,Stack,Options)
      end.
  
  
  