<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>HTML安全 on 办公AI智能小助手</title>
    <link>https://blog.qife122.com/tags/html%E5%AE%89%E5%85%A8/</link>
    <description>Recent content in HTML安全 on 办公AI智能小助手</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <copyright>qife</copyright>
    <lastBuildDate>Mon, 03 Nov 2025 13:06:19 +0800</lastBuildDate>
    <atom:link href="https://blog.qife122.com/tags/html%E5%AE%89%E5%85%A8/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>HTML安全解析指南：Element.setHTML()方法详解</title>
      <link>https://blog.qife122.com/p/html%E5%AE%89%E5%85%A8%E8%A7%A3%E6%9E%90%E6%8C%87%E5%8D%97element.sethtml%E6%96%B9%E6%B3%95%E8%AF%A6%E8%A7%A3/</link>
      <pubDate>Mon, 03 Nov 2025 13:06:19 +0800</pubDate>
      <guid>https://blog.qife122.com/p/html%E5%AE%89%E5%85%A8%E8%A7%A3%E6%9E%90%E6%8C%87%E5%8D%97element.sethtml%E6%96%B9%E6%B3%95%E8%AF%A6%E8%A7%A3/</guid>
      <description>&lt;h1 id=&#34;element-sethtml-方法&#34;&gt;Element: setHTML() 方法&lt;/h1&gt;&#xA;&lt;p&gt;&lt;strong&gt;实验性功能&lt;/strong&gt;：这是一项实验性技术，在生产环境使用前请仔细检查浏览器兼容性表。&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;Element&lt;/code&gt; 接口的 &lt;code&gt;setHTML()&lt;/code&gt; 方法提供了一种XSS安全的方法来解析和清理HTML字符串，将其转换为 &lt;code&gt;DocumentFragment&lt;/code&gt;，然后作为元素的子树插入到DOM中。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
