ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on April 18, 2013, 06:18:21 pm

Title: Re: Bug with smiley and implicit lists
Post by: emanuele on April 18, 2013, 06:18:21 pm
Heck, I thought I fixed the bug with lists and smiles a long time ago...
with [*]

with list:
Title: Re: Re: March/April collection of PRs
Post by: emanuele on April 18, 2013, 06:18:33 pm
with list:

with [*]
Title: Re: Re: March/April collection of PRs
Post by: emanuele on April 18, 2013, 06:20:00 pm
Title: Re: Re: Bug with smiley and implicit lists
Post by: emanuele on April 19, 2013, 06:01:57 am
AHA!
Found it.
I only posted the possible fix, but since I was not sure of the consequences I didn't commit it...well, it may be time to discover any drawback of the fix... O:-)

Quote from: http://www.simplemachines.org/community/index.php?topic=408962.0In Subs.php:
Code: (find) [Select]
			if ($message[$pos + 1] == '0' && !in_array($message[$pos - 1], array(';', ' ', "\t", '>')))
Code: ("replace with") [Select]
			if ($message[$pos + 1] == '0' && !in_array($message[$pos - 1], array(';', ' ', "\t", "\n", '>')))

and
Code: (find) [Select]
				$message = substr($message, 0, $pos2) . "\n" . (!empty($matches[0]) && substr($matches[0], -1) == '[' ? '[/li]' : '[/li][/list]') . "\n" . substr($message, $pos2);
Code: ("replace with") [Select]
				$message = substr($message, 0, $pos2) . (!empty($matches[0]) && substr($matches[0], -1) == '[' ? '[/li]' : '[/li][/list]') . substr($message, $pos2);

The first one should fix Brettflan's report, while the second should fix mine.

Problem is the fix for the problem I reported shouldn't break anything because is explicitly for item codes, while the one for Brettflan's bug affects any bbcode, so I'm not 100% sure is doesn't break anything else...if someone would help reviewing and testing them feel free... O:)
Title: Re: Re: Bug with smiley and implicit lists
Post by: emanuele on April 20, 2013, 08:01:54 am
From quick reply (full editor disabled):
[0]1
[0]2
[0]3
Title: Re: Bug with smiley and implicit lists
Post by: emanuele on April 20, 2013, 08:02:42 am
From post (WYSIWYG disabled)
[0]1
[0]2
[0]3
Title: Re: Re: Bug with smiley and implicit lists
Post by: emanuele on April 27, 2013, 03:52:56 pm
Title: Re: Re: Bug with smiley and implicit lists
Post by: emanuele on April 27, 2013, 04:11:55 pm
PRed some: https://github.com/elkarte/Elkarte/pull/355
Title: Re: Re: Bug with smiley and implicit lists
Post by: emanuele on February 19, 2014, 05:26:51 pm
Apparently my fixes are not enough... meh.
Title: Re: Re: Bug with smiley and implicit lists
Post by: emanuele on February 20, 2014, 05:27:50 am
Title: Re: Re: Bug with smiley and implicit lists
Post by: emanuele on February 20, 2014, 05:28:38 am
Title: Re: Re: Bug with smiley and implicit lists
Post by: emanuele on February 20, 2014, 05:29:21 am