[Pushed] Error with Auto URL
#1
Hello.

We discover one misbehaviour with the Auto URL function in MyBB

If you write an URL with subdomain www, and put (at least) one of these "w" on mayusc, the function will use www as protocol instead of subdomain when make the link.


Examples:

Writen Www.example.com
Result:
Www.example.com

Writen: wWw.example.com
Result:
wWw.example.com

Writen wwW.example.com
Result:
wwW.example.com


Writen WWW.example.com
WWW.example.com

On this board only work as described on the first two examples, on a new board when (al least) one w have mayusc the misbehaviour appears. (Screen shot attached and HTML included below)

   

<div class="post_body scaleimages" id="pid_1">Normal:<br>
<a href="http://www.example.com" target="_blank" class="mycode_url">http://www.example.com</a><br>
<br>
One Mayusc (at least):<br>
<a href="Www://example.com" target="_blank" class="mycode_url">Www://example.com</a><br>
<a href="WWw://example.com" target="_blank" class="mycode_url">WWw://example.com</a><br>
<a href="WWW://example.com" target="_blank" class="mycode_url">WWW://example.com</a><br>
<a href="wWW://example.com" target="_blank" class="mycode_url">wWW://example.com</a><br>
<a href="wWw://example.com" target="_blank" class="mycode_url">wWw://example.com</a><br>
<br>
Others:<br>
WWWW.example.com
</div>
Reply
#2
Confirmed. This is due to this line failing.
[Image: fSGNVQj.png]
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/2821

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)