From 9c713109f35f779ce174bffadf7b6b6118509103 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 6 Oct 2016 12:58:47 -0400 Subject: [PATCH] ignore unrecognized inline directives When we see a directive we do not understand, skip it instead of reporting an error. This avoids embedding system error messages in the output at the expense of sometimes leaking rst directives. See the murano-dashboard 3.0.0 release announcement for an example of the error this addresses. http://lists.openstack.org/pipermail/openstack-announce/2016-October/001748.html Change-Id: I28dd334b7d326e13e7aaf7cd9c0a160ae1e9fa09 Signed-off-by: Doug Hellmann --- releasetools/rst2txt.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/releasetools/rst2txt.py b/releasetools/rst2txt.py index 4789006..abebc72 100644 --- a/releasetools/rst2txt.py +++ b/releasetools/rst2txt.py @@ -937,15 +937,12 @@ class TextTranslator(nodes.NodeVisitor): pass def visit_problematic(self, node): - self.add_text('>>') + pass def depart_problematic(self, node): - self.add_text('<<') + pass def visit_system_message(self, node): - self.new_state(0) - self.add_text('' % node.astext()) - self.end_state() raise nodes.SkipNode def visit_comment(self, node):