@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Drag & Drop: set a link as external

Summary:
Rest assured: external links remain evil, by default.

Don't adopt them randomly by induction.

Whether you believe it or not, this specific external
link merited some deep thoughts on Phorge:

- https://we.phorge.it/T15172

So, whenever you use a mouse, a finger, or whenever we have
a confirmation dialog or not to prevent onblur disasters,
this change is probably consistent with common expectations.

Having said, external links remain evil - by default.

Closes T15172

Test Plan:
- Drag & Drop a File on a Remarkup text
- click on the link inside the popup
- it opens in a new tab (without risk of form loss)

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15172

Differential Revision: https://we.phorge.it/D25077

+13 -1
+13 -1
webroot/rsrc/js/core/FileUpload.js
··· 115 115 116 116 switch (this.getStatus()) { 117 117 case 'done': 118 - var link = JX.$N('a', {href: this.getPageURI()}, this.getMonogram()); 118 + 119 + // In this case the File upload was successful 120 + 121 + var linkAttr = {}; 122 + linkAttr.href = this.getPageURI(); 123 + 124 + // External links are evil as default. 125 + // Believe it or not, but some Phorge users brainstormed 126 + // for one hour for this specific target="_blank". 127 + // https://we.phorge.it/T15172 128 + linkAttr.target = '_blank'; 129 + 130 + var link = JX.$N('a', linkAttr, this.getMonogram()); 119 131 120 132 content = [ 121 133 JX.$N('strong', {}, ['Upload Complete (', link, ')']),