feilaoda
V2EX  ›  问与答

貌似当前的很多Markdown处理Html都有问题

  •  
  •   feilaoda · May 4, 2012 · 3120 views
    This topic created in 5155 days ago, the information mentioned may be changed or developed.
    <input type="text" value="学而不思则罔" />
    <input type="button" value="思而不学则殆" />

    `<input value="我是代码" />`
    2 replies    1970-01-01 08:00:00 +08:00
    9hills
        1
    9hills  
       May 4, 2012
    http://dillinger.io/ 测试无问题。。这个应该用的是github flavor markdown。
    不过都差不多,你应该换个markdown编辑器/解析器了
    feilaoda
        2
    feilaoda  
    OP
       May 4, 2012
    @9hillshttp://dillinger.io/ 试了一下,感觉不是很满足要求,也是有问题的。

    比如输入 <input type="text" value="学而不思则罔" /> 应该需要escape,即只显示改html,而不是显示成input输入框, 你在workspace里面输入html就知道了。感觉会有安全隐患。

    而code里面的html,如果预先escape,则 < 会变成了 &amp;lt;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1229 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 17:39 · PVG 01:39 · LAX 10:39 · JFK 13:39
    ♥ Do have faith in what you're doing.