mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
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:
parent
e87e1786a6
commit
935f3657b5
2 changed files with 2 additions and 1 deletions
|
@ -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),
|
||||||
|
|
Loading…
Reference in a new issue