How can Z͎̠͗ͣḁ̵͙̑l͖͙̫̲̉̃ͦ̾͊ͬ̀g͔̤̞͓̐̓̒̽o͓̳͇̔ͥ text be prevented?

前端 未结 5 1076
独厮守ぢ
独厮守ぢ 2020-12-25 13:48

I\'ve read about how Zalgo text works, and I\'m looking to learn how a chat or forum software could prevent that kind of annoyance. More precisely, what is the complete set

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-25 14:17

    Make the box overflow:hidden. It doesn't actually disable Zalgo text, but it prevents it from damaging other comments.

    .comment {
      /* the overflow: hidden is what prevents one comment's combining marks from affecting its siblings */
      overflow: hidden;
      /* the padding gives space for any legitimate combining marks */
      padding: 0.5em;
      /* the rest are just to visually divide the three comments */
      border: solid 1px #ccc;
      margin-top: -1px;
      margin-bottom: -1px;
    }
    The below comment looks awful.
    H̡̫̤ͭ̓̓̇͗̎̀ơ̯̗͒̄̀̈ͤ̀͡w͓̲͙͋ͬ̊ͦ̂̀̚ ͎͉͖̌ͯͅͅd̳̘̿̃̔̏ͣ͂̉̕ŏ̖̙͋ͤ̊͗̓͟͜e͈͕̯̮͌ͭ̍̐̃͒s͙͔̺͇̗̱̿̊̇͞ ̸ͩͩ͑̋̀ͮͥͦ̊Z̆̊͊҉҉̠̱̦̩͕ą̟̹͈̺̹̋̅ͯĺ̡̘̹̻̩̩͋͘g̪͚͗ͬ͒o̢̖͇̬͍͇̔͋͊̓ ̢͈͂ͣ̏̿͐͂ͯ͠t̛͓̖̻̲ͤ̈ͣ͝e͋̄ͬ̽͜҉͚̭͇ͅx̌ͤ̓̂̓͐͐́͋͡ț̗̹̄̌̀ͧͩ̕͢ ̮̗̩̳̱̾w͎̭̤̄͗ͭ̃͗ͮ̐o̢̯̻̾ͣͬ̽̔̍͟r̢̪͙͍̠̀ͅǩ̵̶̗̮̮ͪ́?̙͉̥̬ͤ̌͗ͩ̕͡
    The above comment looks awful.

提交回复
热议问题