Hello FPC-Pascal, Wednesday, May 25, 2011, 8:33:57 AM, you wrote:
>> "&lt;" i> I'm not sure what you mean here. That's an already escaped html. Let it be a mini htmlpage: <html><title>-&lt;-</title></html> i> If you have already html entities you should not escape them. If you do not i> have html entities you should escape them. i> The Escaping and unescaping works well, I already tested them before I sent i> them. The right content of <title> tag is "-<-" when unescaped but the code unescapehtml produce "-<-". Explanation step by step: 1) The code looks for all '&' 2) When found replace it by '&' 3) <title> content is now "-<-" 4) Now the code looks for '<' 5) When found replace it by '<' 6) Now title content is "-<-" ---------- Result := StringReplace(s, '&', '&', [rfReplaceAll]); Result := StringReplace(Result, '<', '<', [rfReplaceAll]); ---------- I hope my explanations are now understandable. -- Best regards, José _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal