Usually \ 'should work, but it seems like sometimes you need to use' '(double apostrophe).
Try the following:
<%= pageBean.replace(list.getColumn(0), "'", "\'" %>
or
<%= pageBean.replace(list.getColumn(0), "'", "''"
One of them should work (in my experience).
For attributes in HTML tags, I would use "(quotation mark), not" (apostrophe).
Paweล dyda
source share