]> code.citadel.org Git - citadel.git/commitdiff
Fix StrHtmlEcmaEscAppend() more edge cases in utf8 handling
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 18 Aug 2011 17:53:18 +0000 (17:53 +0000)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 18 Aug 2011 17:53:18 +0000 (17:53 +0000)
 - Ctdl_GetUtf8SequenceLength(): return 0 for broken, 1 for non-utf8 sequences
 - StrHtmlEcmaEscAppend(): another attempt to fix json appending:
  - use switch instead of Rumpelstilskin if sequence
  - use HKEY for our static sequences
  - don't check for buffer expansion again while utf8-handling; we have 11 bytes reserved, utf8 will at most become 6 bytes
  - Simply handle ASCII chars in the utf8 loop
  - since aptr is moved implicitely, we mustn't move it for the last byte
  - add missing handling for some escapers
  - let unicode escapers pass


No differences found