elkarte / Elkarte

ElkArte Forum. A free, open source, modern discussion forum / BB
https://elkarte.github.io/Elkarte/
BSD 3-Clause "New" or "Revised" License
175 stars 61 forks source link

url bbcode #2293

Open interlab opened 8 years ago

interlab commented 8 years ago

maybe this bug?

Example:

http://habrahabr.ru/search/?target_type=posts&q=[perl6]&order_by=date

not parse this part: [perl6]&order_by=date

emanuele45 commented 8 years ago

You mean the "autolinking"? (i.e. you put the url in the message and it converts into a link?)

interlab commented 8 years ago

yes

emanuele45 commented 8 years ago

Then it's one of those "impossible to fix bugs without rewriting a huge chunk of code" (and even then it wouldn't be that easy).

The opening bracket is recognized as starting bbc and the text is split at that point. The part before is autolinked, the part after is parsed in the next cycle of the loop. Determine if the [ is a starting tag or not beforehand is impossible at the moment, we can know only after the whole processing has been done, but when the processing is done, the previous chunk of text was already parsed (and the autolink created). So it's really impossible to fix... :disappointed: