Allow %f2 and other escape sequences in editor link
Test Plan: Open in Editor. Reviewers: epriestley Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2184
This commit is contained in:
@@ -81,7 +81,7 @@ EXAMPLE;
|
|||||||
->setCaption(
|
->setCaption(
|
||||||
'Link to edit files in external editor. '.
|
'Link to edit files in external editor. '.
|
||||||
'%f is replaced by filename, %l by line number, %r by repository '.
|
'%f is replaced by filename, %l by line number, %r by repository '.
|
||||||
'callsign. '.
|
'callsign, %% by literal %. '.
|
||||||
"For documentation, see {$editor_doc_link}.")
|
"For documentation, see {$editor_doc_link}.")
|
||||||
->setValue($preferences->getPreference($pref_editor)))
|
->setValue($preferences->getPreference($pref_editor)))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
|
|||||||
@@ -418,6 +418,7 @@ final class PhabricatorUser extends PhabricatorUserDAO {
|
|||||||
PhabricatorUserPreferences::PREFERENCE_EDITOR);
|
PhabricatorUserPreferences::PREFERENCE_EDITOR);
|
||||||
if ($editor) {
|
if ($editor) {
|
||||||
return strtr($editor, array(
|
return strtr($editor, array(
|
||||||
|
'%%' => '%',
|
||||||
'%f' => phutil_escape_uri($path),
|
'%f' => phutil_escape_uri($path),
|
||||||
'%l' => phutil_escape_uri($line),
|
'%l' => phutil_escape_uri($line),
|
||||||
'%r' => phutil_escape_uri($callsign),
|
'%r' => phutil_escape_uri($callsign),
|
||||||
|
|||||||
Reference in New Issue
Block a user