anchor.diff:      case B of
           <<_:O/binary, "=", _/binary>> ->
               S2 = skip_whitespace(B, ?INC_COL(S1)),
  -            tokenize_word_or_literal(B, S2);
  +            tokenize_quoted_or_unquoted_attr_value(B, S2);
           _ ->
               {Attr, S1}
       end.
  +    
  +tokenize_quoted_or_unquoted_attr_value(B, S=#decoder{offset=O}) ->
  +    case B of
  +        <<_:O/binary>> ->
  +            { [], S };
  +        <<_:O/binary, Q, _/binary>> when Q =:= ?QUOTE orelse
  +                                         Q =:= ?SQUOTE ->
  +            tokenize_quoted_attr_value(B, ?INC_COL(S), [], Q);
  +        <<_:O/binary, _/binary>> ->
  +            tokenize_unquoted_attr_value(B, S, [])
  +    end.
  +    
  +tokenize_quoted_attr_value(B, S=#decoder{offset=O}, Acc, Q) ->
  +    case B of
  +        <<_:O/binary>> ->
  +            { iolist_to_binary(lists:reverse(Acc)), S };
  +        <<_:O/binary, $&, _/binary>> ->
  +            {{data, Data, false}, S1} = tokenize_charref(B, ?INC_COL(S)),
  +            tokenize_quoted_attr_value(B, S1, [Data|Acc], Q);
  +        <<_:O/binary, Q, _/binary>> ->
  +            { iolist_to_binary(lists:reverse(Acc)), ?INC_COL(S) };
  +        <<_:O/binary, $\n, _/binary>> ->
  +            { iolist_to_binary(lists:reverse(Acc)), ?INC_LINE(S) };
  +        <<_:O/binary, C, _/binary>> ->
  +            tokenize_quoted_attr_value(B, ?INC_COL(S), [C|Acc], Q)
  +    end.
  +    
  +tokenize_unquoted_attr_value(B, S=#decoder{offset=O}, Acc) ->
  +    case B of
  +        <<_:O/binary>> ->
  +            { iolist_to_binary(lists:reverse(Acc)), S };
  +        <<_:O/binary, $&, _/binary>> ->
  +            {{data, Data, false}, S1} = tokenize_charref(B, ?INC_COL(S)),
  +            tokenize_unquoted_attr_value(B, S1, [Data|Acc]);
  +        <<_:O/binary, $/, $>, _/binary>> ->
  +            { iolist_to_binary(lists:reverse(Acc)), S };
  +        <<_:O/binary, C, _/binary>> when ?PROBABLE_CLOSE(C) ->
  +            { iolist_to_binary(lists:reverse(Acc)), S };
  +        <<_:O/binary, C, _/binary>> ->
  +            tokenize_unquoted_attr_value(B, ?INC_COL(S), [C|Acc])
  +    end.   
   
   skip_whitespace(B, S=#decoder{offset=O}) ->
       case B of
  
positive.code:             tokenize_doctype(B, ?ADV_COL(S, 10));
          <<_:O/binary, "<![CDATA[", _/binary>> ->
              tokenize_cdata(B, ?ADV_COL(S, 9));
          <<_:O/binary, "<?", _/binary>> ->
              {Tag, S1} = tokenize_literal(B, ?ADV_COL(S, 2)),
              {Attrs, S2} = tokenize_attributes(B, S1),
  
negative.code: append_stack_child(StartTag, [{Name, Attrs, Acc} | Stack]) ->
      [{Name, Attrs, [StartTag | Acc]} | Stack].
  
  destack(<<"br">>, Stack) ->
      %% This is an ugly hack to make dumb_br_test() pass,
      %% this makes it such that br can never have children.
      Stack;
  destack(TagName, Stack) when is_list(Stack) ->
      F = fun (X) ->
                  case X of
  