[Pushed] Extra </li> in lists output by the parser
It seems that the parser is outputting an extra </li> before the first element of a list.

Here's a suggested patch to fix the issue -  I haven't filed it as a PR because I understand that protocol is to report bugs here first.

In inc/class_parser.php, in function mycode_parse_list(), replace:

 		$message = preg_replace("#[^\S\n\r]*\[\*\]\s*#", "</li>\n<li>", $message);
		$message .= "</li>";


		$a = preg_split("#[^\S\n\r]*\[\*\]\s*#", $message);
		if(isset($a[0]) && trim($a[0]) == '')
		$message = '<li>'.implode("</li>\n<li>", $a)."</li>\n";
I can confirm the issue.
Though there is no visual impact but looking at the output source its evident.
Good catch, I never noticed this before. I'm pushing this to GitHub now.

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/3128

Thanks for contributing to MyBB!

The MyBB Group

Forum Jump:

Users browsing this thread: 1 Guest(s)