Topic: URL autoparsing priority

Posted under Site Bug Reports & Feature Requests

This topic has been locked.

Bug overview description.
While updating the howto:sites_and_sources, I had to fix a bunch of parsing errors because it seems the URL autoparsing has too high a precedence.

What part(s) of the site page(s) are affected?
Anywhere where DText can be used.

What is the expected behavior?
When using at least some operators (e.g. ` or \[color]) surrounding a URL, one would expect that operator to have precedence over the URL autoparsing. So that `\http://foo.bar` would be rendered as a non-linking inline comment like so: \http://foo.bar, and \[color=yellow]\http://foo.bar[/color] would become a yellow-colored \http://foo.bar (dunno if it would be clickable or not) which I can't reproduce here due to lack of privileges.

What actual behavior is given instead?
The URL is autoparsed before the operators, thus breaking both, because the closing ` or \[\color] is parsed as part of the URL. `\http://foo.bar` becomes http://foo.bar, and \[color=yellow]\http://foo.bar[/color] becomes \http://foo.bar[/color.

Time of incident (if applicable).
n/a

Can you reproduce the bug every time?
Yes.

What steps did you take to replicate this bug?
Just try to use these operators I mentioned surrounding a URL in a DText-enabled page and preview it.

Errors or other messages returned (if any).
n/a

Updated by TheGreatWolfgang

  • 1