Fix for mangling of non-ASCII output filenames #18

Open
wants to merge 8 commits into
from
View
@@ -36,7 +36,7 @@ AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
-AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, AC_PACKAGE_BUGREPORT)
+AM_INIT_AUTOMAKE([foreign])
# Checks for programs.
View
@@ -904,7 +904,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 );
View
@@ -1351,14 +1351,14 @@ void TY_(ReportAccessWarning)( TidyDocImpl* doc, Node* node, uint code )
{
ctmbstr fmt = GetFormatFromCode(code);
doc->badAccess |= BA_WAI;
- messageNode( doc, TidyAccess, node, fmt );
+ messageNode( doc, TidyAccess, node, "%s", fmt );
}
void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code )
{
ctmbstr fmt = GetFormatFromCode(code);
doc->badAccess |= BA_WAI;
- messageNode( doc, TidyAccess, node, fmt );
+ messageNode( doc, TidyAccess, node, "%s", fmt );
}
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
@@ -1377,7 +1377,7 @@ void TY_(ReportWarning)(TidyDocImpl* doc, Node *element, Node *node, uint code)
switch (code)
{
case NESTED_QUOTATION:
- messageNode(doc, TidyWarning, rpt, fmt);
+ messageNode(doc, TidyWarning, rpt, "%s", fmt);
break;
case OBSOLETE_ELEMENT:
@@ -1458,7 +1458,7 @@ void TY_(ReportError)(TidyDocImpl* doc, Node *element, Node *node, uint code)
case INCONSISTENT_NAMESPACE:
case DOCTYPE_AFTER_TAGS:
case DTYPE_NOT_UPPER_CASE:
- messageNode(doc, TidyWarning, rpt, fmt);
+ messageNode(doc, TidyWarning, rpt, "%s", fmt);
break;
case COERCE_TO_ENDTAG:
@@ -1477,7 +1477,7 @@ void TY_(ReportError)(TidyDocImpl* doc, Node *element, Node *node, uint code)
case ENCODING_IO_CONFLICT:
case MISSING_DOCTYPE:
case SPACE_PRECEDING_XMLDECL:
- messageNode(doc, TidyWarning, node, fmt);
+ messageNode(doc, TidyWarning, node, "%s", fmt);
break;
case TRIM_EMPTY_ELEMENT:
@@ -1526,7 +1526,7 @@ void TY_(ReportFatal)( TidyDocImpl* doc, Node *element, Node *node, uint code)
{
case SUSPECTED_MISSING_QUOTE:
case DUPLICATE_FRAMESET:
- messageNode(doc, TidyError, rpt, fmt);
+ messageNode(doc, TidyError, rpt, "%s", fmt);
break;
case UNKNOWN_ELEMENT:
View
0 src/mappedio.c 100755 → 100644
No changes.
View
0 src/mappedio.h 100755 → 100644
No changes.
View
0 src/version.h 100755 → 100644
No changes.
View
@@ -3,3 +3,5 @@
cd tests
./testall.sh
+./testxml.sh
+./testaccess.sh
View
@@ -1,3 +1,6 @@
# Nothing
-EXTRA_DIST = input/ output/ accessibility/
+EXTRA_DIST = input output accessibility \
+ testcases.txt testone.sh testall.sh \
+ xmlcases.txt testxml.sh \
+ accesscases.txt testaccessone.sh testaccess.sh
View
0 tests/testxml.sh 100644 → 100755
No changes.