MyBB Community Forums

Full Version: [Regex] Why "&" disallowed in url-BB-Code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
http://myDomain.com/myScript.php?src=http://www.mybb.com/assets/images/mascot.png&hash=6c142d32eddc6c8a8e1b480706977795

yes
Hello!
(2015-10-16, 05:11 PM)StefanT Wrote: [ -> ]Do you have an actual and valid example that doesn't work with the URL mycode?

(2015-10-16, 05:58 PM)expat Wrote: [ -> ]
http://myDomain.com/myScript.php?src=http://www.mybb.com/assets/images/mascot.png&hash=6c142d32eddc6c8a8e1b480706977795

yes
This should work fine ... http://myDomain.com/myScript.php?src=http://www.mybb.com/assets/images/mascot.png&hash=6c142d32eddc6c8a8e1b480706977795 or
just some linked text

(2015-10-16, 05:11 PM)StefanT Wrote: [ -> ]Do you have an actual and valid example that doesn't work with the URL mycode?

Yes, see http://community.mybb.com/thread-175426-...pid1191025.

Best regards!
Thomas131
what about the IMG tag then? i know it s moved away from the URL tag, but it might be related

Thing is its the same both in the mycode AND template (USING XTHREADS THOUGH)
(2015-10-16, 05:11 PM)StefanT Wrote: [ -> ]Do you have an actual and valid example that doesn't work with the URL mycode?

2 posts above yours:

(2015-10-10, 07:27 PM)Destroy666 Wrote: [ -> ]test1
test2
test3

If you change the mentioned regex, it works.

EDIT: parentheses are also excluded for no apparent reason:
parsed
not parsed
https://en.wikipedia.org/wiki/Disambigua...biguation)

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

Thanks for contributing to MyBB!

Regards,
The MyBB Group
if you want to test your regex, really cool site

http://www.regexr.com/

http://www.google.com?test1=1
@Destroy666 You are welcome!

@expat: Thanks for the link. In my opinion an even cooler site is: https://regex101.com/, but you will have to set the g-Flag, also in pcre-Mode, to get php-like results

Best Regards!
Thomas131
Honestly, I'm not sure what there are multiple regexs just to handle URLs. When this was first brought up, I mentioned it on Slack and was told it had always worked this way and was expected behaviour.
I'm to bad in regexing to answer this question.

One thing I find strange is the {1} which does exactly nothing in
#([\>\s\(\)])(http|https|ftp|news|irc|ircs|irc6){1}://([^\/\"\s\<\[\.]+\.([^\/\"\s\<\[\.]+\.)*[\w]+(:[0-9]+)?(/([^\"\s<\[]|\[\])*)?([\w\/\)]))#iu
Pages: 1 2