本文整理自网络,侵删。
function torehtml(const strHTML: string): string;begin Result :=strHTML; Result := StringReplace(Result, '"', '"', [rfReplaceAll]); Result := StringReplace(Result, '''', ''', [rfReplaceAll]); Result := StringReplace(Result, '>', '>', [rfReplaceAll]); Result := StringReplace(Result, '<', '<', [rfReplaceAll]); Result := StringReplace(Result, '&', '&', [rfReplaceAll]);end;
常用HTML转义对照表字符 十进制 转义字符 " " " & & & < < < > > > 不断开空格(non-breaking space)
相关阅读 >>
Delphi 随便找个网站获取格林威治时间, 并转换到北京时间
Delphi webbrowser 无法调用当前浏览器的版本
Delphi 在xp/2k 下实现 win+ctrl+del 等键的屏蔽的方法
Delphi 生成xml 方法 与 Delphi txt文件操作
更多相关阅读请进入《Delphi》频道 >>