aboutsummaryrefslogtreecommitdiff
path: root/Driver/HTMLPrint.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-17 22:24:51 +0000
committerChris Lattner <sabre@nondot.org>2008-04-17 22:24:51 +0000
commit1ee8d6ffabdec9288dbc87773913fde5e2938772 (patch)
treecc7fc9650df76cab4dce86602aa9df836fdc5b48 /Driver/HTMLPrint.cpp
parenta42cf2e309a038fd5d2d541f4662aaffe9a060c4 (diff)
Handle text escaping (e.g. & -> &amp;) last, to avoid interactions between 'replace' operations and insert operations. This fixes a problem with "&;&" on line 666 of the gcc.c example I sent out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/HTMLPrint.cpp')
-rw-r--r--Driver/HTMLPrint.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Driver/HTMLPrint.cpp b/Driver/HTMLPrint.cpp
index 54678dea3e..ff04b0e609 100644
--- a/Driver/HTMLPrint.cpp
+++ b/Driver/HTMLPrint.cpp
@@ -55,7 +55,6 @@ HTMLPrinter::~HTMLPrinter() {
// Format the file.
unsigned FileID = R.getSourceMgr().getMainFileID();
- html::EscapeText(R, FileID, false, true);
html::AddLineNumbers(R, FileID);
html::AddHeaderFooterInternalBuiltinCSS(R, FileID);
@@ -67,6 +66,7 @@ HTMLPrinter::~HTMLPrinter() {
html::SyntaxHighlight(R, FileID, *PP);
html::HighlightMacros(R, FileID, *PP);
}
+ html::EscapeText(R, FileID, false, true);
// Open the output.