[SOLVED] CB auto action and utf-8

3 years 9 months ago - 3 years 9 months ago #319475 by activha
[SOLVED] CB auto action and utf-8 was created by activha
Hello,
I'm stuck with a simple thing regarding transferring data by url to an autoaction.

An example string to transfer is :
Crédit Agricole, 1re banque des particuliers... | Crédit Agricole

This is transferred to a url by something like :
?titlew=" . rawurlencode($title) . "

Then on the code autoaction I have :
$input = JFactory::getApplication()->input;
$title = $input->get('titlew' );
$title = rawurldecode($title);
echo $title;

But CB outputs is :
CrditAgricole1rebanquedesparticuliers...CrditAgricole

Can you tell me what I do wrong ?
Thanks

Please Log in to join the conversation.

3 years 9 months ago #319492 by beat
Replied by beat on topic CB auto action and utf-8
Joomla's $input->get() method has filter "cmd" by default, not "text", and removes non-command-like charcters, like spaces and non-US-ascii characters.

title = $input->get('titlew', null, 'text' );
will give you the result you expect.

P.S. Please note that this PHP/Joomla support is outside the scope of our developer support and is not part of our membership.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

3 years 9 months ago #319505 by activha
Replied by activha on topic CB auto action and utf-8
Thanks a lot
Didn’t think to this

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.206 seconds

Facebook Twitter LinkedIn