Skip to content

ui.table with markdown doesn't render text html.escape() #2392

Open
@pascal-pfeiffer

Description

@pascal-pfeiffer

Wave SDK Version, OS

Wave 1.5.1

Actual behavior

Given I have some html text that I want to display in ui.table, together with other markdown text in the the same column. I want to prevent code injection attacks, so I am using html.escape() on all text first.

When rendering in Wave, some escaped html characters are not visualized correctly:

escaped csv

Name: Content, dtype: object
0                                         <ul>\r
1                                         <ul>\r
2        <li><label for="usermail&quo...
3        <li><label for="usermail&quo...
Name: Content, dtype: object

so, somehow <ul> gets visualized correctly while <li><label for="usermail">Email</label> is rendered with escaped strings &lt;.

image

Expected behavior

Render escaped markdown in ui.table()

Potential improvement

Add a flag to force safe rendering in ui.table() to reduce the risk of code injection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug in codeuiRelated to UI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions