<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tomotomo1129</author_name>
  <author_url>https://blog.hatena.ne.jp/tomotomo1129/</author_url>
  <blog_title>Web開発における知見共有系ページ</blog_title>
  <blog_url>https://job-info.hateblo.jp/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>jQuery</anon>
    <anon>XSS</anon>
    <anon>htmlとtextの違い</anon>
    <anon>セキュリティ</anon>
  </categories>
  <description>見た目が同じでも安全性はまったく違います html()がしていること XSSとは何か text()の挙動 なぜjQueryに2つ存在するのか 実際に起きる事故 「サーバでエスケープしているから大丈夫」は危険 安全な書き方 jQueryの設計意図 よくある誤解 結局どう使い分けるべきか 見た目が同じでも安全性はまったく違います jQueryで要素に文字列を入れるとき、多くの人が最初に覚えるのが次の2つです。 $('#msg').html('Hello'); $('#msg').text('Hello'); 画面上の見た目は同じです。しかし結論から言うと、この2つは役割がまったく違う関数です。特に…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjob-info.hateblo.jp%2Fentry%2F2026%2F02%2F11%2F193215&quot; title=&quot;jQueryのhtml()とtext()の違いをXSSの観点で解説する - Web開発における知見共有系ページ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-02-11 19:32:15</published>
  <title>jQueryのhtml()とtext()の違いをXSSの観点で解説する</title>
  <type>rich</type>
  <url>https://job-info.hateblo.jp/entry/2026/02/11/193215</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
