]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
doclet/gtkdoc: Escape text and source code
authorFlorian Brosch <flo.brosch@gmail.com>
Sat, 13 Oct 2012 22:59:23 +0000 (00:59 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Sat, 13 Oct 2012 22:59:23 +0000 (00:59 +0200)
src/doclets/gtkdoc/commentconverter.vala

index b758910132d6423805629ea8cd84994e9bc4055b..5f79f1a7af2c8e6a6d5648ae36af9c7411eea76b 100644 (file)
@@ -227,7 +227,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
   
        public override void visit_source_code (SourceCode code) {
                current_builder.append ("<programlisting>");
-               current_builder.append (code.code);
+               current_builder.append (Markup.escape_text (code.code));
                current_builder.append ("</programlisting>");
        }
   
@@ -294,7 +294,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
        }
   
        public override void visit_text (Text t) {
-               current_builder.append (t.content);
+               current_builder.append (Markup.escape_text (t.content));
                t.accept_children (this);
        }
 }