しかし、HTML要素の読み取り・書き込みを行う「innerHTML」プロパティには無毒化処理を実施する機能がなく、プログラマーが自分で処理を書く必要があった。 そのため、無毒化処理にどうしても漏れが生じ、XSS脆弱性の温床となってしまっているのが現実だ。
完全なソースコード、キャンペーンバナーの動的書き換えデモ、および textContent との違いについての詳細な解説は、以下のブログ記事にて公開しています。 【JavaScript】innerHTMLによるHTML構造の動的取得と更新 JavaScriptで画面の文字を変更する際、textContent は ...
You can create a release to package software, along with release notes and links to binary files, for other people to use. Learn more about releases in our docs.
innerHTML The innerHTML property is a part of the JavaScript HTMLElement object and it allows developers to access and manipulate the HTML content of an element. The innerHTML property returns the ...