Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gnoweb): disable html in markdown (#2964)
<!-- please provide a detailed description of the changes made in this pull request. --> 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 flag `with-html`, which defaults to `false`. 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`, or `jumbotrons`... are built with HTML. We will need to adopt the new design system expected with `gnoweb2.0` (or future `gnoweb1` improvements). ### BEFORE: ![127 0 0 1_8888_ (1)](https://github.com/user-attachments/assets/04328db4-7076-4690-9727-50c33f58954d) ### AFTER: ![127 0 0 1_8888_ (2)](https://github.com/user-attachments/assets/b8d9532c-45e6-4a78-b166-2f6d0176bd10) --- ### BEFORE: ![127 0 0 1_8888_r_gnoland_pages](https://github.com/user-attachments/assets/445cbb3f-565b-42af-b794-14f9c682d4ce) ### AFTER: ![127 0 0 1_8888_r_gnoland_pages (1)](https://github.com/user-attachments/assets/ac7131f1-c2d4-42ea-a426-66244782e910) --------- Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com>
- Loading branch information
93ece90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'Go Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.20
.BenchmarkBinary/EmptyStruct:encode
532
ns/op 96 B/op 2 allocs/op292.7
ns/op 96 B/op 2 allocs/op1.82
BenchmarkBinary/EmptyStruct:encode - ns/op
532
ns/op292.7
ns/op1.82
BenchmarkBinary/EmptyStruct:decode
270.3
ns/op 0 B/op 0 allocs/op143.1
ns/op 0 B/op 0 allocs/op1.89
BenchmarkBinary/EmptyStruct:decode - ns/op
270.3
ns/op143.1
ns/op1.89
BenchmarkBinary/ShortArraysStruct:encode
847.7
ns/op 192 B/op 4 allocs/op613.4
ns/op 192 B/op 4 allocs/op1.38
BenchmarkBinary/ShortArraysStruct:encode - ns/op
847.7
ns/op613.4
ns/op1.38
BenchmarkBinary/ShortArraysStruct:decode
359.6
ns/op 0 B/op 0 allocs/op232.7
ns/op 0 B/op 0 allocs/op1.55
BenchmarkBinary/ShortArraysStruct:decode - ns/op
359.6
ns/op232.7
ns/op1.55
BenchmarkBinary/EmbeddedSt1:encode
5712
ns/op 2037 B/op 65 allocs/op4629
ns/op 2037 B/op 65 allocs/op1.23
BenchmarkBinary/EmbeddedSt1:encode - ns/op
5712
ns/op4629
ns/op1.23
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
63791914
ns/op 5132 B/op 9 allocs/op31995929
ns/op 5125 B/op 9 allocs/op1.99
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
63791914
ns/op31995929
ns/op1.99
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
127514643
ns/op 5139 B/op 9 allocs/op31995929
ns/op 5125 B/op 9 allocs/op3.99
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
127514643
ns/op31995929
ns/op3.99
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
254944278
ns/op 5158 B/op 9 allocs/op31995929
ns/op 5125 B/op 9 allocs/op7.97
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
254944278
ns/op31995929
ns/op7.97
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
509845083
ns/op 5196 B/op 10 allocs/op31995929
ns/op 5125 B/op 9 allocs/op15.93
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
509845083
ns/op31995929
ns/op15.93
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
1019480212
ns/op 5528 B/op 13 allocs/op31995929
ns/op 5125 B/op 9 allocs/op31.86
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
1019480212
ns/op31995929
ns/op31.86
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - allocs/op
13
allocs/op9
allocs/op1.44
BenchmarkBcryptGenerateFromPassword/benchmark-security-param
2039059936
ns/op 5528 B/op 13 allocs/op31995929
ns/op 5125 B/op 9 allocs/op63.73
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - ns/op
2039059936
ns/op31995929
ns/op63.73
BenchmarkBcryptGenerateFromPassword/benchmark-security-param - allocs/op
13
allocs/op9
allocs/op1.44
BenchmarkSigning
84211
ns/op 1856 B/op 36 allocs/op25701
ns/op 64 B/op 1 allocs/op3.28
BenchmarkSigning - ns/op
84211
ns/op25701
ns/op3.28
BenchmarkSigning - B/op
1856
B/op64
B/op29
BenchmarkSigning - allocs/op
36
allocs/op1
allocs/op36
BenchmarkSigning
82758
ns/op 1856 B/op 36 allocs/op25701
ns/op 64 B/op 1 allocs/op3.22
BenchmarkSigning - ns/op
82758
ns/op25701
ns/op3.22
BenchmarkSigning - B/op
1856
B/op64
B/op29
BenchmarkSigning - allocs/op
36
allocs/op1
allocs/op36
BenchmarkVerification
165378
ns/op 864 B/op 19 allocs/op61110
ns/op 0 B/op 0 allocs/op2.71
BenchmarkVerification - ns/op
165378
ns/op61110
ns/op2.71
BenchmarkVerification - B/op
864
B/op0
B/op+∞
BenchmarkVerification - allocs/op
19
allocs/op0
allocs/op+∞
BenchmarkVerification
170292
ns/op 864 B/op 19 allocs/op61110
ns/op 0 B/op 0 allocs/op2.79
BenchmarkVerification - ns/op
170292
ns/op61110
ns/op2.79
BenchmarkVerification - B/op
864
B/op0
B/op+∞
BenchmarkVerification - allocs/op
19
allocs/op0
allocs/op+∞
BenchmarkRandomBytes/random
69.08
ns/op 16 B/op 1 allocs/op33.25
ns/op 4 B/op 1 allocs/op2.08
BenchmarkRandomBytes/random - ns/op
69.08
ns/op33.25
ns/op2.08
BenchmarkRandomBytes/random - B/op
16
B/op4
B/op4
BenchmarkRandomBytes/random
105.8
ns/op 32 B/op 1 allocs/op33.25
ns/op 4 B/op 1 allocs/op3.18
BenchmarkRandomBytes/random - ns/op
105.8
ns/op33.25
ns/op3.18
BenchmarkRandomBytes/random - B/op
32
B/op4
B/op8
BenchmarkRandomBytes/random
268.1
ns/op 112 B/op 1 allocs/op33.25
ns/op 4 B/op 1 allocs/op8.06
BenchmarkRandomBytes/random - ns/op
268.1
ns/op33.25
ns/op8.06
BenchmarkRandomBytes/random - B/op
112
B/op4
B/op28
BenchmarkRandomBytes/random
2331
ns/op 1024 B/op 1 allocs/op33.25
ns/op 4 B/op 1 allocs/op70.11
BenchmarkRandomBytes/random - ns/op
2331
ns/op33.25
ns/op70.11
BenchmarkRandomBytes/random - B/op
1024
B/op4
B/op256
BenchmarkSmall/boltdb-1000-100-16-40/update
1409779
ns/op 45235 B/op 382 allocs/op974381
ns/op 37376 B/op 371 allocs/op1.45
BenchmarkSmall/boltdb-1000-100-16-40/update - ns/op
1409779
ns/op974381
ns/op1.45
BenchmarkSmall/boltdb-1000-100-16-40/update - B/op
45235
B/op37376
B/op1.21
BenchmarkSmall/boltdb-1000-100-16-40/block - B/op
5773064
B/op4692235
B/op1.23
BenchmarkSmall/memdb-1000-100-16-40/block - B/op
9109826
B/op6597573
B/op1.38
BenchmarkSmall/memdb-1000-100-16-40/block - allocs/op
165847
allocs/op117018
allocs/op1.42
BenchmarkMedium/boltdb-100000-100-16-40/update - B/op
126634
B/op102976
B/op1.23
BenchmarkMedium/memdb-100000-100-16-40/update
1256333
ns/op 372552 B/op 7383 allocs/op1042125
ns/op 258863 B/op 4998 allocs/op1.21
BenchmarkMedium/memdb-100000-100-16-40/update - ns/op
1256333
ns/op1042125
ns/op1.21
BenchmarkMedium/memdb-100000-100-16-40/update - B/op
372552
B/op258863
B/op1.44
BenchmarkMedium/memdb-100000-100-16-40/update - allocs/op
7383
allocs/op4998
allocs/op1.48
BenchmarkLevelDBBatchSizes/goleveldb-100000-400-16-40/update - B/op
49079
B/op38752
B/op1.27
BenchmarkLevelDBBatchSizes/goleveldb-100000-400-16-40/update - allocs/op
588
allocs/op453
allocs/op1.30
BenchmarkLevelDBBatchSizes/goleveldb-100000-2000-16-40/update - allocs/op
415
allocs/op341
allocs/op1.22
BenchmarkLevelDBBatchSizes/goleveldb-100000-2000-16-40/block - B/op
110063516
B/op77471570
B/op1.42
BenchmarkLevelDBBatchSizes/goleveldb-100000-2000-16-40/block - allocs/op
1319374
allocs/op960917
allocs/op1.37
BenchmarkHash/ripemd160
2826
ns/op 25 B/op 1 allocs/op700.4
ns/op 25 B/op 1 allocs/op4.03
BenchmarkHash/ripemd160 - ns/op
2826
ns/op700.4
ns/op4.03
BenchmarkHash/sha2-256
522.5
ns/op 33 B/op 1 allocs/op171.3
ns/op 33 B/op 1 allocs/op3.05
BenchmarkHash/sha2-256 - ns/op
522.5
ns/op171.3
ns/op3.05
BenchmarkHash/sha3-256
1842
ns/op 33 B/op 1 allocs/op717.4
ns/op 33 B/op 1 allocs/op2.57
BenchmarkHash/sha3-256 - ns/op
1842
ns/op717.4
ns/op2.57
BenchmarkWriteSecretConnection
5768
ns/op 0 B/op 0 allocs/op4097
ns/op 0 B/op 0 allocs/op1.41
BenchmarkWriteSecretConnection - ns/op
5768
ns/op4097
ns/op1.41
BenchmarkReadSecretConnection
3351
ns/op 0 B/op 0 allocs/op2364
ns/op 0 B/op 0 allocs/op1.42
BenchmarkReadSecretConnection - ns/op
3351
ns/op2364
ns/op1.42
BenchmarkCacheStoreGetNoKeyFound - B/op
183
B/op149
B/op1.23
This comment was automatically generated by workflow using github-action-benchmark.
CC: @ajnavarro @thehowl @zivkovicmilos