GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    白湯さゆぬ (sayunu@mofu.kemo.no)'s status on Monday, 01-May-2023 19:01:03 JST 白湯さゆぬ 白湯さゆぬ

    Google Chrome の 103.0.5060.134 で、整ってない HTML が奇妙な形に解釈される。「<p><i><p><b>」と書いた時に、「<p><i></i></p><p><b></b></p>」ではなく「<p><i></i></p><p><i><b></b></i></p>」のような構造になる。(最新版がどうかは知らない。)

    p‐要素は入れ子にならないから、二個目の開始タグで一個目が暗黙的に閉ぢるというのはいい。でも一個目の中身で開けたままになっていた要素を解析器は覚えていて、二個目の解析にも影響してしまうみたい。 #Chrome #HTML

    In conversation Monday, 01-May-2023 19:01:03 JST from mofu.kemo.no permalink

    Attachments


    1. https://cdn.masto.host/mofu/media_attachments/files/110/290/953/381/890/948/original/c729d605895467bd.png
    • Embed this notice
      Ryusei (mandel59@pleroma.ryusei.dev)'s status on Monday, 01-May-2023 19:00:59 JST Ryusei Ryusei
      in reply to

      @sayunu そこらへんのパーサーの挙動はWHATWGの HTML Living Standard 仕様で操作的に定義されているんですよね。

      HTML Living Standard 13.2 Parsing HTML documents

      そこの Note に、なんでそうなっているのかが書いてあります。

      While the HTML syntax described in this specification bears a close resemblance to SGML and XML, it is a separate language with its own parsing rules.

      Some earlier versions of HTML (in particular from HTML2 to HTML4) were based on SGML and used SGML parsing rules. However, few (if any) web browsers ever implemented true SGML parsing for HTML documents; the only user agents to strictly handle HTML as an SGML application have historically been validators. The resulting confusion — with validators claiming documents to have one representation while widely deployed web browsers interoperably implemented a different representation — has wasted decades of productivity. This version of HTML thus returns to a non-SGML basis.

      Authors interested in using SGML tools in their authoring pipeline are encouraged to use XML tools and the XML serialization of HTML.

      昔のHTMLは、仕様上はSGMLによって構文解析ルールが規定されていましたが、SGMLは複雑で、ブラウザーは仕様通りにちゃんと実装することはなかったんですよね。今はHTMLの仕様はSGMLと無関係に仕様が決まっていて、結果的に、昔からのブラウザーの挙動を再現しつつ、ブラウザー間の挙動を統一するものになっています。

      In conversation Monday, 01-May-2023 19:00:59 JST permalink
      ㆑ repeated this.
    • Embed this notice
      Ryusei (mandel59@pleroma.ryusei.dev)'s status on Monday, 01-May-2023 19:00:59 JST Ryusei Ryusei
      in reply to
      • Ryusei

      @sayunu <p><i><p><b> に該当する例は、特に https://html.spec.whatwg.org/multipage/parsing.html#an-introduction-to-error-handling-and-strange-cases-in-the-parser で述べられているのですが、誤ったマークアップに対する対処として意図的に導入されている挙動のようです。

      In conversation Monday, 01-May-2023 19:00:59 JST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        HTML Standard
    • Embed this notice
      白湯さゆぬ (sayunu@mofu.kemo.no)'s status on Monday, 01-May-2023 19:01:01 JST 白湯さゆぬ 白湯さゆぬ
      in reply to

      太古の既存ウエブページを壊さない為の意図的な挙動だったりするのかしら。p のタグを「大きい br」みたいに捉えてるページが存在して、段落を跨ぐ形でインライン要素を使ってる事があるとしたら。

      In conversation Monday, 01-May-2023 19:01:01 JST permalink
    • Embed this notice
      白湯さゆぬ (sayunu@mofu.kemo.no)'s status on Monday, 01-May-2023 19:01:02 JST 白湯さゆぬ 白湯さゆぬ
      in reply to

      CSSBattle が無理な字数削減を奨励するので無理してたら遭遇したのでした。

      https://cssbattle.dev/

      In conversation Monday, 01-May-2023 19:01:02 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.