You are viewing a single comment's thread from:

RE: Markdown-It Plugins: Proxy Image & Mixed HTML Fixer

in #utopian-io6 years ago

Nice work. Though, is the first issue a real issue? Markdown is often not friendly with HTML tags in general and to have expected result, one should leave a blank space between the tags and other markdown parts.


It often depends on the markdown flavour and the tools probably but in my opinion, people just did not learn to use it properly. On the other hand, Steemit and even Busy changes the behaviour with every report. For example, if the images were not displayed without <img> or ![](), I believe that it would be much better.


Well, while I do agree, and honestly hate very much inline HTML on Markdown, that's something Steemians are already used to.

The first one is a quick hack, and for me, it qualifies as a real issue since the single line raw html + link/image parsing is the default behavior of Github (CommonMark)

As far the image tags, there's another plugin to be published soon, concerning auto-images.

You would be amazed to see how many posts contains plain URLs without proper image or link markup wrapping.

My take on that matter is to allow images matching patterns and extensions, and auto-image then.

The whole process is not heavy on the tokenizer, as far as I've tested.

So, on the things pending commit and proper repository refactoring coming up:

  • @schema parsing (detect usernames on post content and auto-link)
  • auto images for predefined patterns or hosts.
  • safe-link exits (you are leaving to a suspicious URL).
  • extensive, but more strict HTML sanitization.
  • Asynchronous markdown rendering.
  • Parallel render executing by ready-to-use Web Workers

As a tutorial from my recent "sanitization" journey, I ended up even creating a Web Assembly parser with Rust (with some help from @tensor).

Thank you for your dedicated review of this post @espoem, keep up the great work!

Hey, thanks for this extensive comment. However, I have little doubts about the last statement.

Thank you for your dedicated review of this post @espoem, keep up the great work!

Your post is yet to be reviewed in Utopian. This is a real struggle for us to distinguish personal comments and review comments and for me to fully understand how you meant it. :D


I'm considering review, the act of checking out, putting though on the contribution and give some very welcomed feedback!

Officially or not, it's of great help!

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.030
BTC 58659.71
ETH 3164.52
USDT 1.00
SBD 2.43