& displays as & in Edit View (Read Only)

I have a lookup value that contains & that displays correctly in List View, but in Edit View when set as Read Only, & displays as &. How to fix? Thanks.

  1. Which version?
  2. What is the Edit Tag of the field?

v2026.12
Text type.

Here is the HTML markup:

<span class="form-control-plaintext">Las Vegas Exotic Pet &amp;amp;amp; Reptile Expo</span>

That means the data has been saved twice (and HTML encoded) before, you need to fix the data first, e.g. by executing in your database manager

UPDATE your_table
SET column_name = REPLACE(
    REPLACE(
        REPLACE(
            REPLACE(column_name, '&amp;', '&'),
        '&amp;', '&'),
    '&amp;', '&'),
'&amp;', '&')
WHERE column_name LIKE '%&amp;%';

If you want to prevent future HTML encoding for the field, you may enable Raw for the field using the RemoveXSS extension.

In the database, it is &amp;. In List View, it displays correctly. In Edit View, it is double escaped. Thus, the output is not consistent. I assume it would be a PHPMaker issue.