[Pushed] Nested links still possible for multiline [url] tags
#1
The merged PR #3127 attempted amongst other things to eliminate the possibility of the parser outputting nested links. Unfortunately, it seems to have missed one case: certain "url" tags that span multiple lines.

For example, this two-line "url" tag:

[url=http://example1.com]http://example2.com
[/url]

currently results in nested links (a link to example2 being nested in a link to example1).

It looks to me that the fix is simply to add to the regexes in mycode_auto_url() an "s" modifier on top of the existing "i" and "u" modifiers (so that the initial part of the regexes matching HTML links detects HTML links that run over multiple lines).
Reply
#2
There are 2 parsers taken in account here.

Here what you see is you are not getting. In editor it is parsed fine by the editor's parser but while you post it it will pass through MyBB parser and will become like this:
http://example2.com[url=<br />][/url]
A complete revamp of the parser is indeed required, atleast to make sure it sinks with the editor's parser. If not then there is no WYSIWYG.
* effone thinks why on earth people nest BBCode that way, at least in practical example ...
Reply
#3
Hi,

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/3150

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)