Skip to content
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

[Backport 2.x] [Table Visualization][Bug] Fix Url content display in table #3084

Merged
merged 1 commit into from
Jan 3, 2023

Commits on Dec 15, 2022

  1. [Table Visualization][BUG] Fix Url content display (#2918)

    Currently, the new table can not format Url. If we
    set to use URL format in index pattern field, table
    will display it as string.
    
    In this PR, we switch the format from string to html.
    To make html understandable by react as a DOM element,
    we use dangerouslySetInnerHTML to transform it. For the
    security, since the content is not from random input but
    fetched from stored data, we should be safe as long as
    data is not messed.
    
    To provide more security protection, we also add dompurify
    package to sanitize the html content.
    
    Issue Resolved:
    #2905
    
    Signed-off-by: Anan Zhuang <ananzh@amazon.com>
    
    Signed-off-by: Anan Zhuang <ananzh@amazon.com>
    (cherry picked from commit b16ee64)
    Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    
    # Conflicts:
    #	CHANGELOG.md
    github-actions[bot] committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    32c9a2f View commit details
    Browse the repository at this point in the history