-
Notifications
You must be signed in to change notification settings - Fork 386
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
feat(gnoweb): disable html in markdown #2964
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2964 +/- ##
==========================================
- Coverage 63.08% 63.07% -0.01%
==========================================
Files 563 563
Lines 79254 79273 +19
==========================================
+ Hits 49998 50005 +7
- Misses 25896 25904 +8
- Partials 3360 3364 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This is the way. |
@albttx Thank you for the additional tests! I really appreciate :) |
In line with our vision for a HTML-free Gnoweb, this PR disables the rendering of HTML within Markdown content. It replaces all elements recognized as HTML tags (e.g.,
<div>
,<br>
,<web-component>
) with empty spaces before sending the content to the front-end. The parsing still happens via JavaScript, but now without any HTML tags. However, HTML tags like`<div>lorem ipsum</div>`
can still appear within code blocks in Markdown, as usual, but won’t be parsed/read as actual HTML.Additionally, this feature is controlled by the
gnoweb
boolean flagwith-html
, which defaults tofalse
.cc @gfanton
Warning
Enabling this feature will break the design of gno.land realms (and any other realms relying on HTML), since current layout elements like
columns
,stacks
, orjumbotrons
... are built with HTML. We will need to adopt the new design system expected withgnoweb2.0
(or futuregnoweb1
improvements).BEFORE:
AFTER:
BEFORE:
AFTER: