Why do I need Markdown?

前端 未结 4 1068
孤独总比滥情好
孤独总比滥情好 2021-02-05 20:52

Why do I need a Markdown with a front edit editor like WMD? What does the markdown do to the content that’s sent from the WMD editor?
How does Markdown store the content in

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-05 21:28

    The reason for using an alternate encoding system other than HTML is for security

    Markdown and other such wiki style encoding systems do not usually support scripting languages

    HTML supports scripting languages in many ways (

    The two main security issues are:

    1. Malware criminals use scripts in user generated content to attempt malware actions on the content readers computer by scripting to access known security holes

    2. Free loaders using scripts to subvert the rest of the site by changing the content frame or styles i.e. ads, menu's, logos etc. This can also be criminal behaviour if not just annoying

    By using an intermediate language such as Markdown you have total control on the rendered output

    Filtering HTML is possible, but is also complex and risky

    The other significant reason for an alternate encoding system is enforcement of style. Normal HTML has too many options. By limiting the available options, users can only use certain styles. The usually makes for cleaner looking and more readable content (compare SO to Ebay)

提交回复
热议问题