anchor.diff:  escape_attr(F) when is_float(F) ->
       escape_attr(mochinum:digits(F), []).
   
  -to_html([], Acc) ->
  +to_html(Tree, Acc) ->
  +    to_html(Tree, Acc, true).
  +
  +to_html([], Acc, _Escape) ->
       lists:reverse(Acc);
  -to_html([{'=', Content} | Rest], Acc) ->
  -    to_html(Rest, [Content | Acc]);
  -to_html([{pi, Bin} | Rest], Acc) ->
  +to_html([{'=', Content} | Rest], Acc, Escape) ->
  +    to_html(Rest, [Content | Acc], Escape);
  +to_html([{pi, Bin} | Rest], Acc, Escape) ->
       Open = [<<"<?">>,
               Bin,
               <<"?>">>],
  -    to_html(Rest, [Open | Acc]);
  -to_html([{pi, Tag, Attrs} | Rest], Acc) ->
  +    to_html(Rest, [Open | Acc], Escape);
  +to_html([{pi, Tag, Attrs} | Rest], Acc, Escape) ->
       Open = [<<"<?">>,
               Tag,
               attrs_to_html(Attrs, []),
               <<"?>">>],
  -    to_html(Rest, [Open | Acc]);
  -to_html([{comment, Comment} | Rest], Acc) ->
  -    to_html(Rest, [[<<"<!--">>, Comment, <<"-->">>] | Acc]);
  -to_html([{doctype, Parts} | Rest], Acc) ->
  +    to_html(Rest, [Open | Acc], Escape);
  +to_html([{comment, Comment} | Rest], Acc, Escape) ->
  +    to_html(Rest, [[<<"<!--">>, Comment, <<"-->">>] | Acc], Escape);
  +to_html([{doctype, Parts} | Rest], Acc, Escape) ->
       Inside = doctype_to_html(Parts, Acc),
  -    to_html(Rest, [[<<"<!DOCTYPE">>, Inside, <<">">>] | Acc]);
  -to_html([{data, Data, _Whitespace} | Rest], Acc) ->
  -    to_html(Rest, [escape(Data) | Acc]);
  -to_html([{start_tag, Tag, Attrs, Singleton} | Rest], Acc) ->
  +    to_html(Rest, [[<<"<!DOCTYPE">>, Inside, <<">">>] | Acc], Escape);
  +to_html([{data, Data, _Whitespace} | Rest], Acc, true) ->
  +    to_html(Rest, [escape(Data) | Acc], true);
  +to_html([{data, Data, _Whitespace} | Rest], Acc, false) ->
  +    to_html(Rest, [Data | Acc], false);
  +to_html([{start_tag, Tag, Attrs, Singleton} | Rest], Acc, _Escape) ->
  +    EscapeData = case Tag of 
  +                     <<"script">> -> false;
  +                     _ -> true
  +                 end,
       Open = [<<"<">>,
               Tag,
               attrs_to_html(Attrs, []),
  
positive.code:        mochiweb_html:parse(D0)),
      ok.
  
  parse_broken_pi_test() ->
  	D0 = <<"<html><?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" /></html>">>,
  	?assertEqual(
  
negative.code:                 true -> <<" />">>;
                  false -> <<">">>
              end],
      to_html(Rest, [Open | Acc], EscapeData);
  to_html([{end_tag, Tag} | Rest], Acc, _Escape) ->
      to_html(Rest, [[<<"</">>, Tag, <<">">>] | Acc], false).
  
  doctype_to_html([], Acc) ->
      lists:reverse(Acc);
  