💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
## 方法一: ### 文档说明 > 将html有实体字符转化为html ``` HtmlEncode() ``` ### 代码 ```js function HtmlEncode(text) { return text .replace(/&/g, "&") .replace(/\"/g, '"') .replace(/</g, "<") .replace(/>/g, ">"); } ``` ## 方法二: ``` export const removeHtmltag = (str) => { return str.replace(/<[^>]+>/g, '') } ```