New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown render #1179

Closed
btzr-io opened this Issue Mar 26, 2018 · 9 comments

Comments

Projects
None yet
5 participants
@btzr-io
Collaborator

btzr-io commented Mar 26, 2018

ℹ️ Update:

  • Some issues aren't related to the markdown component but it's mostly css
  • Tables aren't shown correctly on publish and need a custom style. #1179 (comment)

The Issue

Markdown render is missing appropriate css styles, for blockquotes, links, code...
Also some features like headings are disabled but still available in the editor.

Steps to reproduce

  1. Go to a claim page.
  2. See description.

Expected behaviour

Display markdown correctly.

Actual behaviour

Description appears like plain text.

Notes

There are some issues with the markdown component, see: #1023 (comment)

@btzr-io btzr-io changed the title from Markdown ignored to Markdown css Mar 26, 2018

@btzr-io btzr-io added css redesign and removed needs: triage labels Mar 26, 2018

@tzarebczan

This comment has been minimized.

Show comment
Hide comment
@tzarebczan

tzarebczan Apr 17, 2018

Member

@btzr-io do you know if this is the same issue as headings not showing up correctly (i.e. # Heading 1)?

See lbry://filecontrols#d2d8e154e4db21c25dc9a9b0e75a3533a59b98f1

"stream": { "metadata": { "author": "", "description": "<h1> test heading html</h1>\n\n# heading 1 md\n## heading 2 md\n## heading 3 md\n\n", "language": "en", "license": "None", "licenseUrl": "", "nsfw": false, "preview": "", "thumbnail": "", "title": "test markdown / html", "version": "_0_1_0"

Member

tzarebczan commented Apr 17, 2018

@btzr-io do you know if this is the same issue as headings not showing up correctly (i.e. # Heading 1)?

See lbry://filecontrols#d2d8e154e4db21c25dc9a9b0e75a3533a59b98f1

"stream": { "metadata": { "author": "", "description": "<h1> test heading html</h1>\n\n# heading 1 md\n## heading 2 md\n## heading 3 md\n\n", "language": "en", "license": "None", "licenseUrl": "", "nsfw": false, "preview": "", "thumbnail": "", "title": "test markdown / html", "version": "_0_1_0"

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Apr 17, 2018

Collaborator

Also some features like headings are disabled

Collaborator

btzr-io commented Apr 17, 2018

Also some features like headings are disabled

@tzarebczan

This comment has been minimized.

Show comment
Hide comment
@tzarebczan

tzarebczan Apr 17, 2018

Member

Thanks, totally missed that!

Member

tzarebczan commented Apr 17, 2018

Thanks, totally missed that!

@m160

This comment has been minimized.

Show comment
Hide comment
@m160

m160 Apr 19, 2018

Tables are shown correctly in the preview of the edit page:
capture1

When publishing however, it shows up like this:
capture2

m160 commented Apr 19, 2018

Tables are shown correctly in the preview of the edit page:
capture1

When publishing however, it shows up like this:
capture2

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io Apr 19, 2018

Collaborator

@tzarebczan Tables, headings and almost anything that is converted into
an html tag / element is intentionally blocked from preview-render.

Probably to prevent: Markdown's XSS Vulnerability

It's possible to enable specific tags (elements),
but I'm not sure what we really want to include 😕

Collaborator

btzr-io commented Apr 19, 2018

@tzarebczan Tables, headings and almost anything that is converted into
an html tag / element is intentionally blocked from preview-render.

Probably to prevent: Markdown's XSS Vulnerability

It's possible to enable specific tags (elements),
but I'm not sure what we really want to include 😕

@kauffj

This comment has been minimized.

Show comment
Hide comment
@kauffj

kauffj Apr 19, 2018

Member

@btzr-io @tzarebczan I'd say allow h3 and smaller and tables. Solution to XSS is orthogonal to this, as long as any elements are included that type of attack is possible.

Member

kauffj commented Apr 19, 2018

@btzr-io @tzarebczan I'd say allow h3 and smaller and tables. Solution to XSS is orthogonal to this, as long as any elements are included that type of attack is possible.

@tzarebczan tzarebczan removed the redesign label May 3, 2018

@tzarebczan

This comment has been minimized.

Show comment
Hide comment
@tzarebczan

tzarebczan May 4, 2018

Member

@btzr-io have you checked out https://github.com/mdx-js/mdx ? @seanyesmunt recently brought it up.

Member

tzarebczan commented May 4, 2018

@btzr-io have you checked out https://github.com/mdx-js/mdx ? @seanyesmunt recently brought it up.

@btzr-io

This comment has been minimized.

Show comment
Hide comment
@btzr-io

btzr-io May 4, 2018

Collaborator
Collaborator

btzr-io commented May 4, 2018

@tzarebczan @seanyesmunt This looks more easy to integrate: https://github.com/mapbox/remark-react

@btzr-io btzr-io self-assigned this May 7, 2018

@btzr-io btzr-io changed the title from Markdown css to Markdown preview May 7, 2018

@btzr-io btzr-io changed the title from Markdown preview to Markdown render May 7, 2018

btzr-io added a commit that referenced this issue May 7, 2018

@btzr-io btzr-io referenced this issue May 7, 2018

Merged

Fix markdown #1441

3 of 3 tasks complete
@tzarebczan

This comment has been minimized.

Show comment
Hide comment
@tzarebczan

tzarebczan May 25, 2018

Member

Fixed in #1441

Member

tzarebczan commented May 25, 2018

Fixed in #1441

@tzarebczan tzarebczan closed this May 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment