Merge remote branch 'upstream/master'

This commit is contained in:
Shane McCarron 2015-11-16 11:17:14 -06:00
commit 2bbc751599
25 changed files with 47 additions and 215 deletions

View File

@ -138,6 +138,19 @@ if (MSVC)
list(APPEND LIBHFILES ${SRCDIR}/sprtf.h)
endif ()
#######################################
if (NOT LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR lib${LIB_SUFFIX})
endif ()
if (NOT BIN_INSTALL_DIR)
set(BIN_INSTALL_DIR bin)
endif ()
if (NOT INCLUDE_INSTALL_DIR)
set(INCLUDE_INSTALL_DIR include)
endif ()
# Always build the STATIC library
set(name tidy-static)
add_library ( ${name} STATIC ${CFILES} ${HFILES} ${LIBHFILES} )
@ -146,11 +159,11 @@ set_target_properties( ${name} PROPERTIES
)
list ( APPEND add_LIBS ${name} )
install(TARGETS ${name}
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
)
install( FILES ${HFILES} DESTINATION include )
install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} )
########################################
# if user option still on
if (BUILD_SHARED_LIB)
@ -166,11 +179,11 @@ if (BUILD_SHARED_LIB)
set_target_properties( ${name} PROPERTIES
COMPILE_FLAGS "-DBUILDING_SHARED_LIB" )
install(TARGETS ${name}
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
)
endif ()
endif ()
##########################################################
### main executable - linked with STATIC library

View File

@ -1100,6 +1100,7 @@ int main( int argc, char** argv )
tidyOptSetBool( tdoc, TidyQuiet, yes );
else if ( strcasecmp(arg, "help") == 0 ||
strcasecmp(arg, "-help") == 0 ||
strcasecmp(arg, "h") == 0 || *arg == '?' )
{
help( prog );

View File

@ -802,16 +802,6 @@ typedef enum
/* MathML <math> attributes */
TidyAttr_DISPLAY, /**< DISPLAY= (html5) */
/* RDFa global attributes */
TidyAttr_ABOUT, /**< ABOUT= */
TidyAttr_DATATYPE, /**< DATATYPE= */
TidyAttr_INLIST, /**< INLIST= */
TidyAttr_PREFIX, /**< PREFIX= */
TidyAttr_PROPERTY, /**< PROPERTY= */
TidyAttr_RESOURCE, /**< RESOURCE= */
TidyAttr_TYPEOF, /**< TYPEOF= */
TidyAttr_VOCAB, /**< VOCAB= */
N_TIDY_ATTRIBS /**< Must be last */
} TidyAttrId;

View File

@ -47,9 +47,6 @@ static AttrCheck CheckScroll;
static AttrCheck CheckTextDir;
static AttrCheck CheckLang;
static AttrCheck CheckType;
static AttrCheck CheckRDFaSafeCURIE;
static AttrCheck CheckRDFaTerm;
static AttrCheck CheckRDFaPrefix;
#define CH_PCDATA NULL
#define CH_CHARSET NULL
@ -88,11 +85,6 @@ static AttrCheck CheckRDFaPrefix;
#define CH_TARGET CheckTarget
#define CH_VTYPE CheckVType
#define CH_ACTION CheckAction
#define CH_RDFAPREFIX CheckRDFaPrefix
#define CH_RDFASCURIE CheckRDFaSafeCURIE
#define CH_RDFASCURIES CheckRDFaSafeCURIE
#define CH_RDFATERM CheckRDFaTerm
#define CH_RDFATERMS CheckRDFaTerm
static const Attribute attribute_defs [] =
{
@ -425,16 +417,6 @@ static const Attribute attribute_defs [] =
#endif
{ TidyAttr_DISPLAY, "display", CH_PCDATA }, /* on MATH tag (html5) */
/* RDFa Attributes */
{ TidyAttr_ABOUT, "about", CH_RDFASCURIE },
{ TidyAttr_DATATYPE, "datatype", CH_RDFATERM },
{ TidyAttr_INLIST, "inlist", CH_BOOL },
{ TidyAttr_PREFIX, "prefix", CH_RDFAPREFIX },
{ TidyAttr_PROPERTY, "property", CH_RDFATERMS },
{ TidyAttr_RESOURCE, "resource", CH_RDFASCURIE },
{ TidyAttr_TYPEOF, "typeof", CH_RDFATERMS },
{ TidyAttr_VOCAB, "vocab", CH_URL },
/* this must be the final entry */
{ N_TIDY_ATTRIBS, NULL, NULL }
};
@ -450,32 +432,6 @@ static uint AttributeVersions(Node* node, AttVal* attval)
return (XH50 | HT50);
if (strcmp(attval->attribute,"allowfullscreen") == 0)
return (XH50 | HT50);
/* RDFa global attributes */
if (strcmp(attval->attribute,"about") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"datatype") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"inlist") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"prefix") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"property") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"resource") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"typeof") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"vocab") == 0)
return (XH50 | HT50);
/* Override the settings on these attributes because
* they are allowed everywhere by RDFa */
if (strcmp(attval->attribute,"content") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"rel") == 0)
return (XH50 | HT50);
if (strcmp(attval->attribute,"rev") == 0)
return (XH50 | HT50);
}
/* TODO: maybe this should return VERS_PROPRIETARY instead? */
if (!attval || !attval->dict)
@ -2197,97 +2153,6 @@ AttVal *SortAttVal( AttVal *list, TidyAttrSortStrategy strat)
}
}
/* RDFA support checkers
*
*/
/* CheckRDFAPrefix - ensure the prefix attribute value is
* correct
*
* @prefix takes prefix value pairs in the form:
*
* NCName ':' ' '+ AnyURI
*/
void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval)
{
if (!AttrHasValue(attval))
{
TY_(ReportAttrError)( doc, node, attval, MISSING_ATTR_VALUE);
return;
}
/* Copy the attribute value so we can split it */
if (attval->value) {
uint prefixCount = 0;
/* isPrefix toggles - start at 1 and change to 0 as we
* iterate over the components of the value */
uint isPrefix = 1;
/* Copy it over */
uint len = TY_(tmbstrlen)(attval->value);
tmbstr s = (tmbstr) TidyDocAlloc( doc, len );
s[0] = '\0';
TY_(tmbstrcpy)( s, attval->value );
/* iterate over value */
tmbstr tPtr = s;
tmbstr t;
while ( ( t = strtok(tPtr, " ") ) != NULL ) {
tPtr = NULL;
if (isPrefix) {
/* this piece should be a prefix */
/* prefix rules are that it can have any
* character except a colon - that one must be
* at the end */
tmbstr i = index(t, ':') ;
if (i == NULL) {
/* no colon - bad! */
TY_(ReportAttrError)( doc, node, attval, BAD_ATTRIBUTE_VALUE);
} else if (i != ( t + TY_(tmbstrlen)(t) - 1) ) {
/* not at the end - also bad */
TY_(ReportAttrError)( doc, node, attval, BAD_ATTRIBUTE_VALUE);
}
} else {
/* this piece should be a URL */
prefixCount ++;
}
isPrefix = !isPrefix;
}
TidyDocFree( doc, s ) ;
}
}
/* CheckRDFaTerm - are terms valid
*
*/
void CheckRDFaTerm ( TidyDocImpl* doc, Node *node, AttVal *attval)
{
if (!AttrHasValue(attval))
{
TY_(ReportAttrError)( doc, node, attval, MISSING_ATTR_VALUE);
return;
}
}
/* CheckRDFaSafeCURIE - is a CURIE legal
*
*/
void CheckRDFaSafeCURIE ( TidyDocImpl* doc, Node *node, AttVal *attval)
{
if (!AttrHasValue(attval))
{
TY_(ReportAttrError)( doc, node, attval, MISSING_ATTR_VALUE);
return;
}
}
/*
* local variables:
* mode: c

View File

@ -12,7 +12,6 @@
/* declaration for methods that check attribute values */
typedef void (AttrCheck)(TidyDocImpl* doc, Node *node, AttVal *attval);
typedef void (AttrCheckEx)(TidyDocImpl* doc, Node *node, AttVal *attval, uint limit);
struct _Attribute
{

View File

@ -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 );

View File

@ -1,4 +1,5 @@
skip-quotes: yes
// not really required since this is defaul
skip-nested: yes
indent: auto
tidy-mark: no
clean: yes

View File

@ -0,0 +1,9 @@
// now that skip-nested defaults to 'on', need it off for this test
skip-nested: no
// plus default HTML Tidy configuration - 20150219
indent: auto
char-encoding: latin1
tidy-mark: no
clean: yes
logical-emphasis: yes
indent-attributes: yes

View File

@ -23,10 +23,6 @@ a meaningful context for each cell.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -11,10 +11,6 @@ to set up and provide immediate feedback to users.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -23,10 +23,6 @@ a meaningful context for each cell.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -17,10 +17,6 @@ a meaningful context for each cell.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -17,10 +17,6 @@ a meaningful context for each cell.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -35,11 +35,7 @@ This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL and http://www.aprompt.ca/Tidy/accessibilitychecks.html.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -26,10 +26,6 @@ These measures are needed for people using non-graphical browsers.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -23,10 +23,6 @@ These measures are needed for people using non-graphical browsers.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -10,10 +10,6 @@ These measures are needed for people using non-graphical browsers.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -1,5 +1,5 @@
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 8 column 31 - Warning: '<' + '/' + letter not allowed here
line 10 column 1 - Warning: discarding unexpected </script>
Info: Document content looks like HTML5
2 warnings, 0 errors were found!

View File

@ -1,8 +1,7 @@
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 7 column 28 - Warning: '<' + '/' + letter not allowed here
line 11 column 1 - Warning: missing </script>
Info: Document content looks like HTML5
3 warnings, 0 errors were found!
2 warnings, 0 errors were found!
You are recommended to use CSS to specify page and link colors
About HTML Tidy: https://github.com/htacg/tidy-html5

View File

@ -115,10 +115,6 @@ These measures are needed for people using non-graphical browsers.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain

View File

@ -24,10 +24,6 @@ These measures are needed for people using non-graphical browsers.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -17,10 +17,6 @@ a meaningful context for each cell.
For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
. You may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Or send questions and comments to: https://lists.w3.org/Archives/Public/public-htacg/

View File

@ -1,5 +1,5 @@
<!-- use "==word-2000 yes -xml" on command line -->
<!-- Test case for MS Access files failing with Error: missing quote mark for attribute value -->
<PARAM NAME="XMLData"
VALUE="&lt;xml xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot;&gt; &lt;a:something&gt;&lt;/a:something&gt;&lt;a:something&gt;&lt;/a:something&gt;&lt;/xml&gt;'&quot;">
</PARAM>
<!-- use "==word-2000 yes -xml" on command line -->
<!-- Test case for MS Access files failing with Error: missing quote mark for attribute value -->
<PARAM NAME="XMLData"
VALUE="&lt;xml xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot;&gt; &lt;a:something&gt;&lt;/a:something&gt;&lt;a:something&gt;&lt;/a:something&gt;&lt;/xml&gt;'&quot;">
</PARAM>

Binary file not shown.

View File

@ -1,2 +1,2 @@
5.1.20
2015.11.05
5.1.21
2015.11.14