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.
- Which version?
- 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; 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, '&', '&'),
'&', '&'),
'&', '&'),
'&', '&')
WHERE column_name LIKE '%&%';
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 &. 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.