Skip to content

Text containing angle brackets cutoff early in "Cell Content" modal #796

@cjboyle

Description

@cjboyle

I have a JSON column that occasionally contains string values with angle brackets, e.g. {..., "dtype_numpy": "<f8", ...}. When viewed in the "Cell Content" modal, only text leading up to an opening < bracket is displayed, and cuts off the rest of the text early.

In the following block of code I can fix it by replacing $("#content_modal pre").html(value); with $("#content_modal pre").text(value);

https://github.com/sosedoff/pgweb/blob/main/static/js/app.js#L1524-L1530

Before:
Image

After:
Image

If there are no concerns, I'd be happy to make a quick PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions