View Single Post
11-28-16, 04:03 AM   #1
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Insert Link popup shouldn't include http prefix

When clicking the "Insert Link" button on the post formatting toolbar, the JavaScript popup that asks for the link URL is pre-populated with "http://" --- but since that text is not pre-selected, it's not overwritten when pasting a URL into the input box. If one isn't paying attention and doesn't manually delete the prefix, the post ends up with a link to "http: // http: // example.com" (spaces added to prevent forum auto-formatting) that doesn't work when clicked.

To solve this, the input popup should not pre-populate with "http://" or any other prefix. If the user enters a URL without a protocol (eg. just "example.com") then one can be added for them in the inserted BBCode after the popup input is submitted.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote