Skip to content

Commit 20a65b2

Browse files
committed
Settings - upgrade monospace font regexp to support '.'
Summary: this data is a little weird since its user-entered and we need to put it in a web page un-escaped for the font to load correctly. Ergo, we use a regex to make the input safe / sane, and said regex needs to support a '.'. Fixes T5810. Test Plan: added Fixedsys Excelsior 3.01 to my system and was able to set my preference and get the new font Reviewers: epriestley Reviewed By: epriestley Subscribers: dereckson, epriestley, Korvin Maniphest Tasks: T5810 Differential Revision: https://secure.phabricator.com/D10163
1 parent 9c1c4bb commit 20a65b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/applications/settings/panel/PhabricatorSettingsPanelDisplayPreferences.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function processRequest(AphrontRequest $request) {
3232
$monospaced = $request->getStr($pref_monospaced);
3333

3434
// Prevent the user from doing stupid things.
35-
$monospaced = preg_replace('/[^a-z0-9 ,"]+/i', '', $monospaced);
35+
$monospaced = preg_replace('/[^a-z0-9 ,".]+/i', '', $monospaced);
3636

3737
$preferences->setPreference($pref_titles, $request->getStr($pref_titles));
3838
$preferences->setPreference($pref_editor, $request->getStr($pref_editor));

0 commit comments

Comments
 (0)