本文整理自网络,侵删。
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 (vcl及fmx[firemonkey])启动时的欢迎窗口实现代码
Delphi 简化版的inputquery 中文版输入对话框
Delphi 10.3 调试程序时出错:unable to create process:请求的操作需要提升
更多相关阅读请进入《Delphi》频道 >>