Html special char conversion


#1

I’ve stucked to such problem:
I have html entities in database, after using scaffold I’ve got these
chars not converted (I have strictly " and & in page source). It is what
I need, but after making ./script/generate scaffold modelname
controllername (recreating controller) I’ve got all special chars
converted into entities like (&quot and others). How can I fetch data
and display it without this conversion?


#2

Mikhail S. wrote:

I’ve stucked to such problem:
I have html entities in database, after using scaffold I’ve got these
chars not converted (I have strictly " and & in page source). It is what
I need, but after making ./script/generate scaffold modelname
controllername (recreating controller) I’ve got all special chars
converted into entities like (&quot and others). How can I fetch data
and display it without this conversion?

Hi Mikhail

the h() function works on these “<>&
<%= h(’”&<>’) %> generates “&quote;&<&gt”

Regards Neil