Bug? Placeholder value is html encoded

PaulV888

Member
Hi,

So I was trying to retrieve records in a calc element, based on a value in a placeholder. Whenever the placeholder has a special html character in it, my select failed. I could not find where this happens, and you guys may have a good reason for doing it.

This is my value in my table:
company length(`Company`)
A&B 3

And when I execute this code (calc element):
Code:
$str ="{mc_staging_ms___Company}";
var_dump($str);
$str = html_entity_decode($str);
var_dump($str);

The output is:
string(7) "A&B"
string(3) "A&B"

So somewhere it gets encoded. Doing a decode is an easy workaround for me, however if that is the solution we should add it to the wiki. Took me 5hrs to figure it out :(

Paul

Fabrik 3.4.3
 
Last edited:
Out of interest, try using $data['mc_staging_ms___Company'] rather than a placeholder.

I can't offhand see where we are doing the encoding.

Have you looked in the actual table, see if we're storing it encoded?

-- hugh
 
The DB shows length 3, and I tried your suggestion and the data is not encoded:
Code:
$str ="{mc_staging_ms___Company}";
var_dump($str);
$str =$data['mc_staging_ms___Company'];
var_dump($str);

string(7) "A&B"
string(3) "A&B"

p.s. So is it all you now? Rob is living large now?
 
Rob is still around, but in a reduced capacity. Being a family man now, with a baby and all, he needed a more stable work situation. So he's working a "real job". but is still around for me to hand off the Difficult Stuff to.

And we now have @mediaateam managing the project, bringing some much needed project / site management skills and people power.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top