BOOL inStyle;
BOOL inScript;
BOOL inCSSDeclaration;
+ BOOL hasEmbeddedCSS;
NSMutableArray *crumb;
}
inStyle = NO;
inScript = NO;
inCSSDeclaration = NO;
+ hasEmbeddedCSS = NO;
}
- (void) endDocument
showWhoWeAre();
}
-- (NSString *) _valueForCSSIdentifier: (NSString *) primaryValue
-{
- NSMutableString *value;
- NSEnumerator *classes;
- NSString *currentValue;
-
- value = [NSMutableString new];
- [value autorelease];
-
- classes = [[primaryValue componentsSeparatedByString: @" "] objectEnumerator];
- currentValue = [classes nextObject];
- while (currentValue)
- {
- [value appendFormat: @"SOGoHTMLMail-%@ ", currentValue];
- currentValue = [classes nextObject];
- }
-
- return value;
-}
-
- (void) _appendStyle: (unichar *) _chars
length: (int) _len
{
if (inCSSDeclaration)
{
if (*(char *) currentChar == '}')
- inCSSDeclaration = NO;
+ {
+ inCSSDeclaration = NO;
+ hasEmbeddedCSS = NO;
+ }
}
else
{
if (*(char *) currentChar == '{')
inCSSDeclaration = YES;
- else if (*(char *) currentChar == '.'
- || *(char *) currentChar == '#')
+ if (*(char *) currentChar == ',')
+ hasEmbeddedCSS = NO;
+ else if (!hasEmbeddedCSS)
{
- [css appendString: [NSString stringWithCharacters: start
- length: (currentChar - start + 1)]];
- [css appendString: @"SOGoHTMLMail-"];
- start = currentChar + 1;
+ if (*(char *) currentChar == '@')
+ hasEmbeddedCSS = YES;
+ else
+ if (*(char *) currentChar > 32)
+ {
+ [css appendString: [NSString stringWithCharacters: start
+ length: (currentChar - start)]];
+ [css appendString: @".SOGoHTMLMail-CSS-Delimiter "];
+ hasEmbeddedCSS = YES;
+ start = currentChar;
+ }
}
}
}
[css appendString: [NSString stringWithCharacters: start
- length: (currentChar - start + 1)]];
+ length: (currentChar - start)]];
}
- (void) startElement: (NSString *) _localName
{
skipAttribute = NO;
name = [_attributes nameAtIndex: count];
- if ([name caseInsensitiveCompare: @"class"] == NSOrderedSame
- || [name caseInsensitiveCompare: @"id"] == NSOrderedSame)
- value = [self _valueForCSSIdentifier: [_attributes valueAtIndex: count]];
- else if ([[name lowercaseString] hasPrefix: @"on"])
+ if ([[name lowercaseString] hasPrefix: @"on"])
skipAttribute = YES;
else if ([name caseInsensitiveCompare: @"src"] == NSOrderedSame)
{
className="UIxPageFrame"
title="name"
const:popup="YES"
- >
- <h3 class="contactCardTitle"><var:string value="contactCardTitle" /></h3>
-
- <div id="leftContactColumn" class="contactColumn">
- <div id="primaryInfos">
- <h4><var:string label:value="Contact" /></h4>
- <var:string value="displayName" escapeHTML="NO" />
- <var:string value="nickName" escapeHTML="NO" />
- <var:string value="preferredEmail" escapeHTML="NO" />
- <var:string value="preferredTel" escapeHTML="NO" />
- <var:string value="preferredAddress" escapeHTML="NO" />
- </div>
-
- <var:if condition="hasHomeInfos">
- <div id="homeInfos">
- <h4><var:string label:value="Home" /></h4>
- <var:string value="homePobox" escapeHTML="NO" />
- <var:string value="homeExtendedAddress" escapeHTML="NO" />
- <var:string value="homeStreetAddress" escapeHTML="NO" />
- <var:string value="homeCityAndProv" escapeHTML="NO" />
- <var:string value="homePostalCodeAndCountry" escapeHTML="NO" />
- <var:string value="homeUrl" escapeHTML="NO" />
- </div>
- </var:if>
-
- <var:if condition="hasOtherInfos">
- <div id="otherInfos">
- <h4><var:string label:value="Other Infos" /></h4>
- <var:string value="bday" escapeHTML="NO" />
- <var:string value="tz" escapeHTML="NO" />
- <var:string value="note" escapeHTML="NO" />
- </div>
- </var:if>
- </div>
-
- <div id="rightContactColumn" class="contactColumn">
- <var:if condition="hasTelephones">
- <div id="phoneInfos">
- <h4><var:string label:value="Telephone" /></h4>
- <var:string value="workPhone" escapeHTML="NO" />
- <var:string value="homePhone" escapeHTML="NO" />
- <var:string value="fax" escapeHTML="NO" />
- <var:string value="mobile" escapeHTML="NO" />
- <var:string value="pager" escapeHTML="NO" />
- </div>
- </var:if>
-
- <var:if condition="hasWorkInfos">
- <div id="workInfos">
- <h4><var:string label:value="Work" /></h4>
- <var:string value="workTitle" escapeHTML="NO" />
- <var:string value="workService" escapeHTML="NO" />
- <var:string value="workCompany" escapeHTML="NO" />
- <var:string value="workPobox" escapeHTML="NO" />
- <var:string value="workExtendedAddress" escapeHTML="NO" />
- <var:string value="workStreetAddress" escapeHTML="NO" />
- <var:string value="workCityAndProv" escapeHTML="NO" />
- <var:string value="workPostalCodeAndCountry" escapeHTML="NO" />
- <var:string value="workUrl" escapeHTML="NO" />
- </div>
- </var:if>
- </div>
- </var:component>
+ ><h3 class="contactCardTitle"><var:string value="contactCardTitle" /></h3
+
+ ><div id="leftContactColumn" class="contactColumn"
+ ><div id="primaryInfos"
+ ><h4><var:string label:value="Contact" /></h4
+ ><var:string value="displayName" escapeHTML="NO"
+ /><var:string value="nickName" escapeHTML="NO"
+ /><var:string value="preferredEmail" escapeHTML="NO"
+ /><var:string value="preferredTel" escapeHTML="NO"
+ /><var:string value="preferredAddress" escapeHTML="NO"
+ /></div
+
+ ><var:if condition="hasHomeInfos"
+ ><div id="homeInfos"
+ ><h4><var:string label:value="Home" /></h4
+ ><var:string value="homePobox" escapeHTML="NO"
+ /><var:string value="homeExtendedAddress" escapeHTML="NO"
+ /><var:string value="homeStreetAddress" escapeHTML="NO"
+ /><var:string value="homeCityAndProv" escapeHTML="NO"
+ /><var:string value="homePostalCodeAndCountry" escapeHTML="NO"
+ /><var:string value="homeUrl" escapeHTML="NO"
+ /></div
+ ></var:if
+
+ ><var:if condition="hasOtherInfos"
+ ><div id="otherInfos"
+ ><h4><var:string label:value="Other Infos" /></h4
+ ><var:string value="bday" escapeHTML="NO"
+ /><var:string value="tz" escapeHTML="NO"
+ /><var:string value="note" escapeHTML="NO"
+ /></div
+ ></var:if
+ ></div
+
+ ><div id="rightContactColumn" class="contactColumn"
+ ><var:if condition="hasTelephones"
+ ><div id="phoneInfos"
+ ><h4><var:string label:value="Telephone" /></h4
+ ><var:string value="workPhone" escapeHTML="NO"
+ /><var:string value="homePhone" escapeHTML="NO"
+ /><var:string value="fax" escapeHTML="NO"
+ /><var:string value="mobile" escapeHTML="NO"
+ /><var:string value="pager" escapeHTML="NO"
+ /></div
+ ></var:if
+
+ ><var:if condition="hasWorkInfos"
+ ><div id="workInfos"
+ ><h4><var:string label:value="Work" /></h4
+ ><var:string value="workTitle" escapeHTML="NO"
+ /><var:string value="workService" escapeHTML="NO"
+ /><var:string value="workCompany" escapeHTML="NO"
+ /><var:string value="workPobox" escapeHTML="NO"
+ /><var:string value="workExtendedAddress" escapeHTML="NO"
+ /><var:string value="workStreetAddress" escapeHTML="NO"
+ /><var:string value="workCityAndProv" escapeHTML="NO"
+ /><var:string value="workPostalCodeAndCountry" escapeHTML="NO"
+ /><var:string value="workUrl" escapeHTML="NO"
+ /></div
+ ></var:if
+ ></div
+ ></var:component>