Page MenuHomePhabricator

D11914.diff
No OneTemporary

D11914.diff

diff --git a/src/applications/console/controller/DarkConsoleDataController.php b/src/applications/console/controller/DarkConsoleDataController.php
--- a/src/applications/console/controller/DarkConsoleDataController.php
+++ b/src/applications/console/controller/DarkConsoleDataController.php
@@ -61,7 +61,7 @@
// Because cookie names can now be prefixed, wipe out any cookie value
// with the session cookie name anywhere in its name.
- $pattern = '('.preg_quote(PhabricatorCookies::COOKIE_SESSION).')';
+ $pattern = '#'.preg_quote(PhabricatorCookies::COOKIE_SESSION, '#').'#';
foreach ($_COOKIE as $cookie_name => $cookie_value) {
if (preg_match($pattern, $cookie_name)) {
$panel = PhutilSafeHTML::applyFunction(
diff --git a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
--- a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
+++ b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php
@@ -163,15 +163,15 @@
private function getObjectEmbedPattern() {
$prefix = $this->getObjectNamePrefix();
- $prefix = preg_quote($prefix);
+ $prefix = preg_quote($prefix, '#');
$id = $this->getObjectIDPattern();
- return '(\B{'.$prefix.'('.$id.')([,\s](?:[^}\\\\]|\\\\.)*)?}\B)u';
+ return '#\B{'.$prefix.'('.$id.')([,\s](?:[^}\\\\]|\\\\.)*)?}\B#u';
}
private function getObjectReferencePattern() {
$prefix = $this->getObjectNamePrefix();
- $prefix = preg_quote($prefix);
+ $prefix = preg_quote($prefix, '@');
$id = $this->getObjectIDPattern();
@@ -192,7 +192,7 @@
// The "\b" allows us to link "(abcdef)" or similar without linking things
// in the middle of words.
- return '((?<![#-])'.$boundary.$prefix.'('.$id.')(?:#([-\w\d]+))?(?!\w))u';
+ return '@(?<![#-])'.$boundary.$prefix.'('.$id.')(?:#([-\w\d]+))?(?!\w)@u';
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 2:33 AM (16 h, 49 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736909
Default Alt Text
D11914.diff (1 KB)

Event Timeline