# %%%% date: 2003/05/08 09:46:16; state: Exp; lines: +27 -0 # import-html-hex-numeric-references # Support for importing html hexadecimial numeric character references # (&#xHHHH;) added (it was absent before - they were not being understood at # all when importing HTML!!!). Only numeric character references using # decimial notation were supported before applying this patch! # It's very strange for a browser that is of Netscape 4.x level to not # support hexadecimial numeric character references (it should be obvious # for any web developer). Index: oo/svtools/source/svhtml/parhtml.cxx diff -u oo/svtools/source/svhtml/parhtml.cxx:1.1 oo/svtools/source/svhtml/parhtml.cxx:1.2 --- oo/svtools/source/svhtml/parhtml.cxx:1.1 Mon Apr 28 21:43:54 2003 +++ oo/svtools/source/svhtml/parhtml.cxx Thu May 8 14:46:16 2003 @@ -525,6 +525,33 @@ } } } + else if (nNextCh=='x') + { + while (1) + { + nNextCh = GetNextChar(); + char c = (char)nNextCh; + char xdigit; + switch (c) + { + case '0':case '1':case '2':case '3':case '4': + case '5':case '6':case '7':case '8':case '9': + xdigit = c-'0'; break; + case 'a':case 'b':case 'c':case 'd':case 'e':case 'f': + xdigit = 10+c-'a'; break; + case 'A':case 'B':case 'C':case 'D':case 'E':case 'F': + xdigit = 10+c-'A'; break; + default: + xdigit = 18; + + } + if (xdigit!=18) + cChar = (cChar<<4) + xdigit; + else + break; + + } + } else nNextCh = 0U; }