タグ

JQueryとxssに関するtaninswのブックマーク (2)

  • jQuery 1.9 の $.parseHTML とかその辺 - ほむらちゃほむほむ

    まえがき 2013/01/15 に jQuery 1.9 と 2.0 ベータがリリースされて,サポートブラウザがどうとか互換性がどうとかいうお話がちらほら出る中,jQuery 1.6.3 から続く jQuery('セレクタだと思ったら要素生成でこんにちはこんにちは') 問題 への対応に一応の終止符が打たれたのでいろいろ書いてみる. ver 1.6.2 以前 jQuery の 1.6.2 までは $(String) としたとき,「String になんか( HTML の)タグが入ってるっぽいぞ」と判断すると要素を生成し,そうじゃなければ CSS 的なセレクタとして振る舞うという機能がありました. 大抵の場合,大きな問題はなかったのですけども,ユーザ入力からセレクタを組み立てるときに問題になりました. とくに '#' を含んだ文字列で ID セレクタとして振舞わせようとするのが典型的で,なかでも

    jQuery 1.9 の $.parseHTML とかその辺 - ほむらちゃほむほむ
  • jQuery 1.8 Beta 1: See What’s Coming (and Going!) | Official jQuery Blog

    Hello fellow jQuery users! It’s been a while since you’ve heard from us, but we haven’t been asleep. The jQuery Core Team has been heads-down working on jQuery 1.8, and our first beta release is now available! You can get the code from the jQuery CDN: http://code.jquery.com/jquery-1.8b1.js Give it a try on your current jQuery code and let us know how it works for you. If you experience issues, ple

    taninsw
    taninsw 2012/06/23
    "For anything more than the simple case of creating single elements (e.g., $("<p/>")), and particularly for cases where strings are built from external data, we strongly recommend using $.parseHTML"
  • 1