CodeIgniter Forums
Custom Parser-plugin - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Custom Parser-plugin (/showthread.php?tid=84773)



Custom Parser-plugin - salain - 11-08-2022

HI,

I have a custom parser-plugin it work as expected except if I use any accent character in one of the parameters

Simplified plugin:

PHP Code:
public static function link_logo$params = []): string
{
     return '<span class="text-secondary h85">'$params['link_text'] . '</span>';

Content to render works perfectly:

PHP Code:
$parser = \Config\Services::parser();
$item 'would you like to {+ link_logo  link_text="Online Spanish test level" +}';
echo 
$parser->renderString($item); 


If I change the $item to use some accent characters the plugin is not executed

PHP Code:
$item 'would you like to {+ link_logo  link_text="Online español test level" +}'
this echo the text as declared

Any help would be appreciated





RE: Custom Parser-plugin - kenjis - 11-08-2022

It is a bug.
I sent a PR: https://github.com/codeigniter4/CodeIgniter4/pull/6835


RE: Custom Parser-plugin - salain - 11-08-2022

Thanks


RE: Custom Parser-plugin - InsiteFX - 11-08-2022

@kenjis Thank you.