NamelessMC / Nameless

NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.
https://namelessmc.com/
MIT License
616 stars 310 forks source link

Setting link to open in 'current window' opens in a new window #3508

Closed Reedeley closed 5 months ago

Reedeley commented 5 months ago

Describe the issue

Setting a link to open in 'Current window' in the editor for custom pages does not work. It updates the link in the preview but when saved, it reverts back to opening in a new page (target="_blank" in the tag).

I have confirmed in the DB entry it does not have the target="_blank" attribute on the tag (see below) image

however when visiting the page, the tag is altered (see below). image

EDIT: Appears to be a result of the URL.php class forcing anchors to load in a new page. Why would this be intended behaviour? Wouldn't you want it to scroll down to the anchor on the current page?

NamelessMC Version

2.1.0

Reedeley commented 5 months ago

This issue seems to not be a problem with TinyMCE as originally thought - the editor produces the correct target in the database, but it is converted to '_blank' when loading the page somehow.