Adding an external link to the Reason field (badge) fails silently


(Daniela) #1

Repro on Meta:

  1. go to user admin page
  2. click on Edit badges
  3. assign a badge adding an external URL as Reason
    2018-08-28_18-46-16
  4. click Grant
  5. the badge is assigned, the Reason field remains empty

The admin should be warned that the URL is invalid (is not an internal URL) and clicking on Grant must produce the error Sorry, an error has occurred (btw a specific error is always better to identify where you are wrong).


(Saurabh Patel) #2

Hi,

I can confirm this is the case when using external link. Do we want to throw error on external links? If yes, I can try to work on it.

Thanks


(Daniela) #3

Yes, because no error is shown when you click on Grant, so the administrators do not understand that they are wrong to insert the link.


(Saurabh Patel) #4

Hi @Dax ,
I have created PR for the same. I just wanted to confirm only links have to be allowed in reason, right? Plain text is also not valid, right?

Thanks


(Daniela) #5

The only valid links are internal links to posts and topics, so no plain text.
Thanks, our engineers will review the PR soon.


(RĂ©gis Hanol) #6

PR has now been merged :ok_hand:


(Sam Saffron) #7