From baad0b0064f4d85fade4e811a90d18b5029953fc Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Tue, 26 Jul 2011 14:31:36 +0200 Subject: [PATCH] Don't mangle the output filename Attached patch works for me, and shouldn't affect any other option processing. --- src/config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index fc67eb1..2ce42cb 100644 --- a/src/config.c +++ b/src/config.c @@ -929,7 +929,10 @@ Bool TY_(ParseConfigValue)( TidyDocImpl* doc, TidyOptionId optId, ctmbstr optval TidyBuffer inbuf; /* Set up input source */ tidyBufInitWithAllocator( &inbuf, doc->allocator ); tidyBufAttach( &inbuf, (byte*)optval, TY_(tmbstrlen)(optval)+1 ); - doc->config.cfgIn = TY_(BufferInput)( doc, &inbuf, ASCII ); + if (optId == TidyOutFile) + doc->config.cfgIn = TY_(BufferInput)( doc, &inbuf, RAW ); + else + doc->config.cfgIn = TY_(BufferInput)( doc, &inbuf, ASCII ); doc->config.c = GetC( &doc->config ); status = option->parser( doc, option );