#796·pgweb

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

Author: cjboyleCreated Jun 9, 2025Updated Nov 23, 2025

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.