/*
- Copyright (C) 2000-2005 SKYRIX Software AG
+ Copyright (C) 2000-2006 SKYRIX Software AG
+ Copyright (C) 2006 Helge Hess
This file is part of SOPE.
static NSMutableDictionary *
_parseTagAttributes(NSZone *_zone, const unichar *_buffer,
+ BOOL _uppercaseName,
unsigned *_idx, unsigned _len,
NSException **_exception, WOHTMLParser *self);
/* parse attributes */
- attrs = _parseTagAttributes(_zone, _buffer, _idx, _len, _exc, self);
+ attrs = _parseTagAttributes(_zone, _buffer,
+ NO /* keep name attributes as-is */,
+ _idx, _len, _exc, self);
if (_exc != NULL) {
if (*_exc != nil) {
[name release]; name = nil;
static NSMutableDictionary *
_parseTagAttributes(NSZone *_zone, const unichar *_buffer,
+ BOOL _uppercaseName,
unsigned *_idx, unsigned _len,
NSException **_exception, WOHTMLParser *self)
{
/* fixup NAME attribute, the only one where case matters */
- if ([key length] == 4) {
+ if (_uppercaseName && [key length] == 4) {
if ([@"name" caseInsensitiveCompare:key] == NSOrderedSame) {
[key release];
key = @"NAME";
// skip '<WEBOBJECT'
*_idx += 10;
- attrs = _parseTagAttributes(_zone, _buffer, _idx, _len, _exception, self);
+ attrs = _parseTagAttributes(_zone, _buffer, YES /* uppercase NAME */,
+ _idx, _len, _exception, self);
if (attrs == nil) {
#if 0
[self errorWithFormat: