1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +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:
vrana 2012-04-10 00:55:31 -07:00
parent e87e1786a6
commit 935f3657b5
2 changed files with 2 additions and 1 deletions

View file

@ -81,7 +81,7 @@ EXAMPLE;
->setCaption(
'Link to edit files in external editor. '.
'%f is replaced by filename, %l by line number, %r by repository '.
'callsign. '.
'callsign, %% by literal %. '.
"For documentation, see {$editor_doc_link}.")
->setValue($preferences->getPreference($pref_editor)))
->appendChild(

View file

@ -418,6 +418,7 @@ final class PhabricatorUser extends PhabricatorUserDAO {
PhabricatorUserPreferences::PREFERENCE_EDITOR);
if ($editor) {
return strtr($editor, array(
'%%' => '%',
'%f' => phutil_escape_uri($path),
'%l' => phutil_escape_uri($line),
'%r' => phutil_escape_uri($callsign),