« Return to Thread: HTML cover report should escape comments

HTML cover report should escape comments

by Magnus Henoch-4 :: Rate this Message:

Reply to Author | View in Thread

cover does not escape < and > in comments when generating HTML reports.
Here is a patch that fixes that: (R12B-5 and R13A)

--- cover.erl.orig 2009-04-06 11:44:29.000000000 +0100
+++ cover.erl 2009-04-06 11:46:11.000000000 +0100
@@ -1792,7 +1792,7 @@
  eof ->
     ignore;
  "%"++_=Line -> %Comment line - not executed.
-    io:put_chars(OutFd, [tab(),Line]),
+    io:put_chars(OutFd, [tab(), escape_lt_and_gt(Line, HTML)]),
     print_lines(Module, InFd, OutFd, L+1, HTML);
  RawLine ->
     Line = escape_lt_and_gt(RawLine,HTML),


--
Magnus Henoch, magnus@...
Erlang Training and Consulting
http://www.erlang-consulting.com/

_______________________________________________
erlang-patches mailing list
erlang-patches@...
http://www.erlang.org/mailman/listinfo/erlang-patches

 « Return to Thread: HTML cover report should escape comments