mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-06-01 09:31:59 +00:00
o fixed WO_TAG_LENGTH
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18918 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
06832d836a
commit
414758c592
1 changed files with 13 additions and 3 deletions
|
@ -40,8 +40,8 @@ RCS_ID("$Id$")
|
||||||
|
|
||||||
//strlen("gsweb")
|
//strlen("gsweb")
|
||||||
#define GSWEB_TAG_LENGTH 5
|
#define GSWEB_TAG_LENGTH 5
|
||||||
//strlen("webobjects")
|
//strlen("webobject")
|
||||||
#define WO_TAG_LENGTH 10
|
#define WO_TAG_LENGTH 9
|
||||||
//strlen("!--")
|
//strlen("!--")
|
||||||
#define COMMENT_TAG_LENGTH 3
|
#define COMMENT_TAG_LENGTH 3
|
||||||
|
|
||||||
|
@ -555,6 +555,9 @@ May raise exception.
|
||||||
case '<': // tagStart
|
case '<': // tagStart
|
||||||
{
|
{
|
||||||
int tagStartIndex=_index;
|
int tagStartIndex=_index;
|
||||||
|
|
||||||
|
//ParserDebugLogBuffer(_uniBuf,_length,_index,20);
|
||||||
|
|
||||||
// skip '<'
|
// skip '<'
|
||||||
_index++;
|
_index++;
|
||||||
|
|
||||||
|
@ -570,16 +573,19 @@ May raise exception.
|
||||||
BOOL isClosingTag=NO;
|
BOOL isClosingTag=NO;
|
||||||
GSWHTMLRawParserTagType tagType=GetTagType(_uniBuf,_length,&_index,&isClosingTag);
|
GSWHTMLRawParserTagType tagType=GetTagType(_uniBuf,_length,&_index,&isClosingTag);
|
||||||
int tagPropertiesStartIndex=_index;
|
int tagPropertiesStartIndex=_index;
|
||||||
BOOL stopTag=NO;
|
|
||||||
_textStopIndex=tagStartIndex-1;
|
_textStopIndex=tagStartIndex-1;
|
||||||
NSDebugMLog(@"tagType=%d isClosingTag=%s _textStartIndex=%d",tagType,(isClosingTag ? "YES" : "NO"),_textStartIndex);
|
NSDebugMLog(@"tagType=%d isClosingTag=%s _textStartIndex=%d",tagType,(isClosingTag ? "YES" : "NO"),_textStartIndex);
|
||||||
if (_parserIsDynamicTagType(tagType))
|
if (_parserIsDynamicTagType(tagType))
|
||||||
{
|
{
|
||||||
|
//ParserDebugLogBuffer(_uniBuf,_length,_index,20);
|
||||||
|
|
||||||
// Find tag End;
|
// Find tag End;
|
||||||
while(_index<_length
|
while(_index<_length
|
||||||
&& _uniBuf[_index]!='>')
|
&& _uniBuf[_index]!='>')
|
||||||
_index++;
|
_index++;
|
||||||
|
|
||||||
//ParserDebugLogBuffer(_uniBuf,_length,_index,20);
|
//ParserDebugLogBuffer(_uniBuf,_length,_index,20);
|
||||||
|
|
||||||
if (_uniBuf[_index]!='>')
|
if (_uniBuf[_index]!='>')
|
||||||
{
|
{
|
||||||
[NSException raise:NSInvalidArgumentException
|
[NSException raise:NSInvalidArgumentException
|
||||||
|
@ -588,6 +594,7 @@ May raise exception.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
BOOL stopTag=NO;
|
||||||
int tagStopIndex=_index;
|
int tagStopIndex=_index;
|
||||||
int tagPropertiesStopIndex=_index;
|
int tagPropertiesStopIndex=_index;
|
||||||
NSDebugMLog(@"tagStartIndex=%d tagStopIndex=%d _textStartIndex=%d _textStopIndex=%d _length=%d _index=%d",
|
NSDebugMLog(@"tagStartIndex=%d tagStopIndex=%d _textStartIndex=%d _textStopIndex=%d _length=%d _index=%d",
|
||||||
|
@ -605,6 +612,7 @@ May raise exception.
|
||||||
stopTag=YES;
|
stopTag=YES;
|
||||||
tagPropertiesStopIndex--;
|
tagPropertiesStopIndex--;
|
||||||
};
|
};
|
||||||
|
NSDebugMLog(@"stopTag=%d",stopTag);
|
||||||
tagPropertiesString=[NSString stringWithCharacters:_uniBuf+tagPropertiesStartIndex
|
tagPropertiesString=[NSString stringWithCharacters:_uniBuf+tagPropertiesStartIndex
|
||||||
length:tagPropertiesStopIndex-tagPropertiesStartIndex];
|
length:tagPropertiesStopIndex-tagPropertiesStartIndex];
|
||||||
NSDebugMLog(@"tagPropertiesString='%@'",tagPropertiesString);
|
NSDebugMLog(@"tagPropertiesString='%@'",tagPropertiesString);
|
||||||
|
@ -619,7 +627,9 @@ May raise exception.
|
||||||
[self stopDynamicTagOfType:tagType
|
[self stopDynamicTagOfType:tagType
|
||||||
withTemplateInfo:[self lineAndColumnIndexesStringFromIndex:tagStartIndex]];
|
withTemplateInfo:[self lineAndColumnIndexesStringFromIndex:tagStartIndex]];
|
||||||
}
|
}
|
||||||
|
//ParserDebugLogBuffer(_uniBuf,_length,_index,20);
|
||||||
_index++;
|
_index++;
|
||||||
|
//ParserDebugLogBuffer(_uniBuf,_length,_index,20);
|
||||||
_textStartIndex=_index;
|
_textStartIndex=_index;
|
||||||
NSDebugMLog(@"_textStartIndex=%d _textStopIndex=%d _length=%d _index=%d",
|
NSDebugMLog(@"_textStartIndex=%d _textStopIndex=%d _length=%d _index=%d",
|
||||||
_textStartIndex,_textStopIndex,_length,_index);
|
_textStartIndex,_textStopIndex,_length,_index);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue