It looks like my data gets corrupted when using HTTPapp.HTMLEncode (string): String;
HTMLEncode( 'Jo&hn D<oe' ); // returns 'Jo&am'
This is incorrect and distorts my data. Anyone have suggestions for VCL components that work better? Besides wasting time coding all cases
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
Update
Understanding more about HTML, I found that there was no need to encode the other characters mentioned in my link. You will only need to know the four reserved HTML characters:
&,<,>,"
The problem with the VCL function HTTPApp.HTMLEncode () is related to the buffer size and the new Delphi 2009/2010 specifications for standard Unicode strings by default, this can be fixed so that @mason says below, or it can be fixed by calling WideFormatBuf () instead currently used FormatBuf ().
source
share