爱意满满的作品展示区。
yilin12

Maltose ⚔️ no xss 的表情面板

  •  
  •   yilin12 ·
    luyilin · Jan 23, 2018 · 3131 views
    This topic created in 3072 days ago, the information mentioned may be changed or developed.
    项目起源于 DIYgod 大神的 OwO https://github.com/DIYgod/OwO 项目,初学前端的时候试着模仿了一个

    最近发现将输入框输入的内容直接渲染为 html 是一件危险⚠️ 的事,很容易导致 xss 攻击,昨天我就中招了(伐开心
    我肯定不是个合格的前端,我昨天才知道到什么是 xss 攻击

    所以对这个表情面板做了一点修改,点击表情包时渲染为 markdown 格式而非 img 标签,方便引进在 markdown 格式的输入框里。

    项目地址: https://github.com/luyilin/Maltose

    用例: https://minemine.cc/comment

    预览


    和平的世界没有 xss 💃
    2 replies    2018-01-23 23:09:44 +08:00
    a570295535
        1
    a570295535  
       Jan 23, 2018
    可以啊,支持一下
    sanimal5
        2
    sanimal5  
       Jan 23, 2018
    niu
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4035 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 05:15 · PVG 13:15 · LAX 22:15 · JFK 01:15
    ♥ Do have faith in what you're doing.