Skip to main content
Topic: Re: Bug with smiley and implicit lists (Read 5624 times) previous topic - next topic - Topic derived from March/April collection of PRs
0 Members and 1 Guest are viewing this topic.

Re: Bug with smiley and implicit lists

Heck, I thought I fixed the bug with lists and smiles a long time ago...
with [*]
  • line 1 :)
  • line 2 :P

with list:
  • line 1 :)
  • line 2 :P
Bugs creator.
Features destroyer.
Template killer.

Re: Re: March/April collection of PRs

Reply #1

with list:
  • line 1 :)
  • line 2 :P

with [*]
  • line 1 :)
  • line 2 :P
Bugs creator.
Features destroyer.
Template killer.

Re: Re: March/April collection of PRs

Reply #2

  • line 1 :)
  • line 2 :P
  • line 1 :)
  • line 2 :P
Bugs creator.
Features destroyer.
Template killer.

Re: Re: Bug with smiley and implicit lists

Reply #3

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:)
Last Edit: April 20, 2013, 07:56:43 am by emanuele
Bugs creator.
Features destroyer.
Template killer.

Re: Re: Bug with smiley and implicit lists

Reply #4

From quick reply (full editor disabled):
[0]1
[0]2
[0]3
Bugs creator.
Features destroyer.
Template killer.

Re: Bug with smiley and implicit lists

Reply #5

From post (WYSIWYG disabled)
[0]1
[0]2
[0]3
Bugs creator.
Features destroyer.
Template killer.

Re: Re: Bug with smiley and implicit lists

Reply #6

  • :)
  • :P
  • :(
  • ::)
Bugs creator.
Features destroyer.
Template killer.

Re: Re: Bug with smiley and implicit lists

Reply #7

PRed some: https://github.com/elkarte/Elkarte/pull/355
Bugs creator.
Features destroyer.
Template killer.

Re: Re: Bug with smiley and implicit lists

Reply #8

Apparently my fixes are not enough... meh.
Bugs creator.
Features destroyer.
Template killer.

Re: Re: Bug with smiley and implicit lists

Reply #9

  • line 1 does text before change anything? :)
  • line 2 does text before change anything? :P
  • line 1 does text before change anything? :)
  • line 2 does text before change anything? :P
Bugs creator.
Features destroyer.
Template killer.

Re: Re: Bug with smiley and implicit lists

Reply #10

  • line 1 :) and text after?
  • line 2 :P and text after?
  • line 1 :) and text after?
  • line 2 :P and text after?
Bugs creator.
Features destroyer.
Template killer.

 

Re: Re: Bug with smiley and implicit lists

Reply #11

  • line 1 :)
  • line 2 :P
  • line 1 :)
  • line 2 :P
Bugs creator.
Features destroyer.
Template killer.