Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix for mangling of non-ASCII output filenames #18

Open
wants to merge 8 commits into from

2 participants

@pghmcfc

This commit is a fix for http://bugzilla.redhat.com/725651 in which non-ASCII output filenames are mangled by tidy/tidyp. It makes a special case of the "output filename" option and stores it raw instead of assuming it's ASCII.

@pghmcfc

This is a fix for Fedora Bug http://bugzilla.redhat.com/725651 in which non-ASCII output filenames get mangled:

$ touch 中文.html
$ tidyp -f 中文.html.stderr -output 中文.html.stdout 中文.html
$ ls
中??!.html.stdout  中文.html  中文.html.stderr
pghmcfc and others added some commits
@pghmcfc pghmcfc Avoid deprecated AM_INIT_AUTOMAKE format
Since tidyp is not a project that follows GNU standards and doesn't ship
NEWS, COPYING, etc., use the `foreign' option of AM_INIT_AUTOMAKE to
silence automake's moaning about not having these files.
0712739
@pghmcfc pghmcfc Remove spurious directories from release tarballs
The trailing slashes in EXTRA_DIST entries resulted in a directory hierarchy:

tidyp/tests/input/input/
tidyp/tests/output/output/
tidyp/tests/accessibility/accessibility/

instead of:

tidyp/tests/input/
tidyp/tests/output/
tidyp/tests/accessibility/

in release tarballs generated using `make dist'
4091e9a
@pghmcfc pghmcfc No need for source files to be executable c065ddb
@pghmcfc pghmcfc Include files needed to run regression tests in release tarball f470ba9
@pghmcfc pghmcfc Add XML test cases to release and run them in 'make check' b54a1f5
@pghmcfc pghmcfc Add accessibility test cases to release and run them in 'make check'
Note that some of these tests currently fail:
petdance#1

However, test suite failure does not currently break the build.
24b4d36
@user-none user-none Fix format string warnings. 80d97d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 29, 2011
  1. @pghmcfc
Commits on Aug 1, 2011
  1. @pghmcfc

    Avoid deprecated AM_INIT_AUTOMAKE format

    pghmcfc authored
    Since tidyp is not a project that follows GNU standards and doesn't ship
    NEWS, COPYING, etc., use the `foreign' option of AM_INIT_AUTOMAKE to
    silence automake's moaning about not having these files.
  2. @pghmcfc

    Remove spurious directories from release tarballs

    pghmcfc authored
    The trailing slashes in EXTRA_DIST entries resulted in a directory hierarchy:
    
    tidyp/tests/input/input/
    tidyp/tests/output/output/
    tidyp/tests/accessibility/accessibility/
    
    instead of:
    
    tidyp/tests/input/
    tidyp/tests/output/
    tidyp/tests/accessibility/
    
    in release tarballs generated using `make dist'
  3. @pghmcfc
  4. @pghmcfc
  5. @pghmcfc
  6. @pghmcfc

    Add accessibility test cases to release and run them in 'make check'

    pghmcfc authored
    Note that some of these tests currently fail:
    petdance#1
    
    However, test suite failure does not currently break the build.
Commits on Nov 21, 2013
  1. @user-none @pghmcfc

    Fix format string warnings.

    user-none authored pghmcfc committed
This page is out of date. Refresh to see the latest.
View
2  configure.ac
@@ -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
5 src/config.c
@@ -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
12 src/localize.c
@@ -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
File mode changed
View
0  src/mappedio.h 100755 → 100644
File mode changed
View
0  src/version.h 100755 → 100644
File mode changed
View
2  test-thing.sh
@@ -3,3 +3,5 @@
cd tests
./testall.sh
+./testxml.sh
+./testaccess.sh
View
5 tests/Makefile.am
@@ -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
File mode changed
Something went wrong with that request. Please try again.