anchor.diff:  		       N1 -> N1
   		   end,
   	    if (Pos0 == 0) and (Pos1 /= 0) ->
  -		    print_style_error(Fd,GL,StyleSheet,missing_style_start_tag);
  +		    print_style_error(Fd, IoFormat,
  +				      StyleSheet, missing_style_start_tag);
   	       (Pos0 /= 0) and (Pos1 == 0) ->
  -		    print_style_error(Fd,GL,StyleSheet,missing_style_end_tag);
  +		    print_style_error(Fd, IoFormat,
  +				      StyleSheet,missing_style_end_tag);
   	       Pos0 /= 0 ->
   		    Style = string:sub_string(Str,Pos0,Pos1+7),
  -		    if Fd == GL -> io:format(Fd,["$tc_html","~ts\n"],[Style]);
  -		       true     -> io:format(Fd,"~ts\n",[Style])
  -		    end;
  +		    IoFormat(Fd,"~ts\n",[Style]);
   	       Pos0 == 0 ->
  -		    if Fd == GL -> io:format(Fd,["$tc_html","<style>\n~ts</style>\n"],[Str]);
  -		       true     -> io:format(Fd,"<style>\n~ts</style>\n",[Str])
  -		    end
  +		    IoFormat(Fd,"<style>\n~ts</style>\n",[Str])
   	    end;
   	{error,Reason} ->
  -	    print_style_error(Fd,GL,StyleSheet,Reason)  
  -    end.
  -
  -print_style_error(Fd,GL,StyleSheet,Reason) ->
  +	    print_style_error(Fd,IoFormat,StyleSheet,Reason)
  +    end.
  +
  +print_style_error(Fd, IoFormat, StyleSheet, Reason) ->
       IO = io_lib:format("\n<!-- Failed to load stylesheet ~ts: ~p -->\n",
   		       [StyleSheet,Reason]),
  -    if Fd == GL -> io:format(Fd,["$tc_html",IO],[]);
  -       true     -> io:format(Fd,IO,[])
  -    end,
  -    print_style(Fd,GL,undefined).    
  +    IoFormat(Fd, IO, []),
  +    print_style(Fd, IoFormat, undefined).
   
   close_ctlog(Fd) ->
       io:format(Fd, "\n</pre>\n", []),
       io:format(Fd, [xhtml("<br><br>\n", "<br /><br />\n") | footer()], []),
       file:close(Fd).
  +
  +%%%-----------------------------------------------------------------
  +%%% tc_io_format/3
  +%%% Tell common_test's IO server (group leader) not to escape
  +%%% HTML characters.
  +
  +-spec tc_io_format(io:device(), io:format(), [term()]) -> 'ok'.
  +
  +tc_io_format(Fd, Format0, Args) ->
  +    %% We know that the specially wrapped format string is handled
  +    %% by our IO server, but Dialyzer does not and would tell us
  +    %% that the call to io:format/3 would fail. Therefore, we must
  +    %% fool dialyzer.
  +
  +    Format = case cloaked_true() of
  +		 true -> ["$tc_html",Format0];
  +		 false -> Format0		%Never happens.
  +	     end,
  +    io:format(Fd, Format, Args).
  +
  +%% Return 'true', but let dialyzer think that a boolean is returned.
  +cloaked_true() ->
  +    is_process_alive(self()).
   
   
   %%%-----------------------------------------------------------------
  
positive.code: 	    %% make sure no IO for this test case from the
  	    %% CT logger gets rejected
  	    test_server:permit_io(GL, self()),
  	    print_style(GL,GL,State#logger_state.stylesheet),
  	    set_evmgr_gl(GL),
  	    TCGLs = add_tc_gl(TCPid,GL,State),
  	    if not RefreshLog ->
  
negative.code: 
  			case erlang:is_process_alive(TCGL) of
  			    true ->
  				try tc_io_format(TCGL, "~ts",
  					      [lists:foldl(IoFun,[],Content)]) of
  				    _ -> ok
  				catch
  