MyBB Community Forums
Strange filtering in option "text" - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Strange filtering in option "text" (/thread-170853.html)



Strange filtering in option "text" - Crazycat - 2015-05-20

Hello there,

I was working on a plugin and I've to had a port number, potentially with ssl support (it's for IRC). So, I decided to use the conventional + sign as prefix, but I found a really strange filtering.
My setting definition is:
$settings[] = array(
	'name' => CN_ABPLIM.'_port',
	'title' => $lang->lightirc_porttitle,
	'description' => $lang->lightirc_portdesc,
	'optionscode' => 'text',
	'value' => '6667',
	'disporder' => 3,
	'gid' => $gid,
);

If I enter +6667 and come back to the settings, I see 6667.
If I enter 66+67 and come back, I've 66+67.

I didn't look at source code yet, but seems weird. Or did I do a mistake ?


RE: Strange filtering in option "text" - Destroy666 - 2015-05-20

Yet another issue caused by this: https://github.com/mybb/mybb/issues/1933


RE: Strange filtering in option "text" - Crazycat - 2015-05-20

Thanks for the info.